//templateBox->setIconSize(QSize(60,60));
templateBox->clear();
templateBox->addItem("");
- foreach(TitleTemplate t, titletemplates) {
+ foreach(const TitleTemplate &t, titletemplates) {
templateBox->addItem(t.icon, t.name, t.file);
}
lastDocumentHash = QCryptographicHash::hash(xml().toString().toAscii(), QCryptographicHash::Md5).toHex();
void TitleWidget::templateIndexChanged(int index)
{
QString item = templateBox->itemData(index).toString();
- if (item != "") {
+ if (!item.isEmpty()) {
if (lastDocumentHash != QCryptographicHash::hash(xml().toString().toAscii(), QCryptographicHash::Md5).toHex()) {
if (KMessageBox::questionYesNo(this, i18n("Do you really want to load a new template? Changes in this title will be lost!")) == KMessageBox::No) return;
}
* element, but do not add it to non-text elements.
*/
if (item->type() == TEXTITEM) {
- QStringList effdata = QStringList() << "typewriter" << QString::number(typewriter_delay->value()) + ";" + QString::number(typewriter_start->value());
+ QStringList effdata = QStringList() << "typewriter" << QString::number(typewriter_delay->value()) + ';' + QString::number(typewriter_start->value());
item->setData(100, effdata);
}
break;
{
QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
if (l.size() == 1) {
- QStringList effdata = QStringList() << "typewriter" << QString::number(typewriter_delay->value()) + ";" + QString::number(typewriter_start->value());
+ QStringList effdata = QStringList() << "typewriter" << QString::number(typewriter_delay->value()) + ';' + QString::number(typewriter_start->value());
l[0]->setData(100, effdata);
}
}