Commit 3fc36674 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Fix several simple clazy warnings

parent dbdf173c
......@@ -225,7 +225,7 @@ bool VocabularyModel::setData(const QModelIndex &index, const QVariant &value, i
return false;
}
emit(dataChanged(index, index));
emit dataChanged(index, index);
///@todo trust dirty bit
m_document->setModified();
return true;
......
......@@ -60,8 +60,8 @@ ConjugationWidget::ConjugationWidget(QWidget *parent) : QWidget(parent)
m_conjugationLineEdits[KEduVocWordFlag::Third | KEduVocWordFlag::Neuter | KEduVocWordFlag::Plural]
= pluralThirdNeutralPersonLineEdit;
foreach(const KEduVocWordFlags & index, m_conjugationLineEdits.keys()) {
connect(m_conjugationLineEdits.value(index), &QLineEdit::textChanged, this, &ConjugationWidget::textChanged);
for (auto iter = m_conjugationLineEdits.cbegin(); iter != m_conjugationLineEdits.cend(); ++iter) {
connect(m_conjugationLineEdits.value(iter.key()), &QLineEdit::textChanged, this, &ConjugationWidget::textChanged);
}
}
......
......@@ -61,6 +61,10 @@ public:
/** This will look at the lesson list and also the combo box to determine what should be displayed in the table. */
void updateTableFilter();
VocabularyView *vocabularyView() const {
return m_vocabularyView;
}
public slots:
/**
* Load enabled scripts (from configuration parleyrc)
......@@ -101,10 +105,6 @@ public slots:
*/
void addWordWithTranslation(const QStringList &w);
VocabularyView *vocabularyView() const {
return m_vocabularyView;
}
private slots:
/** Make the search bar visible and focus it */
......
......@@ -13,7 +13,7 @@ AudioButton::AudioButton(QWidget *parent)
: QToolButton(parent), m_player(0)
{
setEnabled(false);
QIcon setIcon(QIcon::fromTheme(QStringLiteral("media-playback-start")));
setIcon(QIcon::fromTheme(QStringLiteral("media-playback-start")));
setText(i18n("Play"));
setToolTip(i18n("Play"));
connect(this, &AudioButton::clicked, this, &AudioButton::playAudio);
......
......@@ -126,7 +126,7 @@ void LatexRenderer::latexRendered()
QString pngFile = m_latexFilename;
pngFile.replace(QLatin1String(".eps"), QLatin1String(".png"));
if (QFileInfo(pngFile).exists()) {
if (QFileInfo::exists(pngFile)) {
QPixmap pixmap(pngFile);
m_label->setPixmap(pixmap);
m_label->setMinimumSize(pixmap.size().boundedTo(QSize(600, 300)));
......
......@@ -140,14 +140,14 @@ public:
*/
QVariantList childContainers();
public slots:
/** Returns an integer, the Container's unique row. Useful for Lesson::removeChildLesson() function */
int row() const {
return m_container->row();
}
public slots:
// virtual Container *parent() { return new Container ( m_container->parent() ); }
/*
......
......@@ -84,7 +84,7 @@ void KGameThemeSelectorPrivate::setupData(KConfigSkeleton * aconfig, KGameThemeS
void KGameThemeSelectorPrivate::findThemes(const QString &initialSelection)
{
qDeleteAll(themeMap.values());
qDeleteAll(themeMap);
themeMap.clear();
//Disconnect the themeList as we are going to clear it and do not want previews generated
......
......@@ -285,7 +285,6 @@ void LanguagePropertiesPage::accept()
// tenses
QList<int> tenseIndex;
QStringList tenses;
QString str;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment