~neon/kmouth/master

« back to all changes in this revision

Viewing changes to phrasebook/initialphrasebookwidget.cpp

  • Committer: Montel Laurent
  • Date: 2015-10-28 19:52:31 UTC
  • Revision ID: git-v1:a9cef2e1700b0a7f9b6a3aca6e6e816617ae2af5
Use new connect api + QStringLiteral

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    QVBoxLayout *mainLayout = new QVBoxLayout(this);
42
42
//TODO PORT QT5     mainLayout->setSpacing(QDialog::spacingHint());
43
43
    QLabel *label = new QLabel(i18n("Please decide which phrase books you need:"), this);
44
 
    label->setObjectName(QLatin1String("booksTitle"));
 
44
    label->setObjectName(QStringLiteral("booksTitle"));
45
45
    mainLayout->addWidget(label);
46
46
 
47
47
    m_model = new QStandardItemModel(0, 1, this);
56
56
    mainLayout->addWidget(view);
57
57
 
58
58
    initStandardPhraseBooks();
59
 
    connect(m_model, SIGNAL(itemChanged(QStandardItem*)),
60
 
            this, SLOT(slotItemChanged(QStandardItem*)));
 
59
    connect(m_model, &QStandardItemModel::itemChanged,
 
60
            this, &InitialPhraseBookWidget::slotItemChanged);
61
61
}
62
62
 
63
63
InitialPhraseBookWidget::~InitialPhraseBookWidget()
122
122
    if (!bookLocation.isNull() && !bookLocation.isEmpty()) {
123
123
        QDir().mkpath(bookLocation);
124
124
        qDebug() << "creating book at location " << bookLocation;
125
 
        book.save(QUrl::fromLocalFile(bookLocation + QLatin1String("standard.phrasebook")));
 
125
        book.save(QUrl::fromLocalFile(bookLocation + QStringLiteral("standard.phrasebook")));
126
126
    }
127
127
}
128
128