GUI: Fix a few Wdeprecated warnings

This commit is contained in:
Daniel Marjamäki 2019-07-22 22:40:11 +02:00
parent 70e0c66c35
commit 896d953aa3
3 changed files with 4 additions and 4 deletions

View File

@ -265,7 +265,7 @@ int CodeEditor::lineNumberAreaWidth()
++digits;
}
int space = 3 + fontMetrics().width(QLatin1Char('9')) * digits;
int space = 3 + fontMetrics().horizontalAdvance(QLatin1Char('9')) * digits;
return space;
}

View File

@ -118,7 +118,7 @@ StyleEditDialog::StyleEditDialog(const CodeEditorStyle& newStyle,
mSampleEditor = new CodeEditor(this);
QFont sampleFont("Monospace");
QFontMetrics fm(sampleFont);
mSampleEditor->setMinimumWidth(fm.width(QString(40, 'W')));
mSampleEditor->setMinimumWidth(fm.horizontalAdvance(QString(40, 'W')));
// designate highlight, errors, and symbols
mSampleEditor->setError(mSampleDocument, mErrLineNum, mErrSymbolsList);
// End Controls

View File

@ -139,7 +139,7 @@ ProjectFileDialog::ProjectFileDialog(ProjectFile *projectFile, QWidget *parent)
libs << library;
}
}
qSort(libs);
libs.sort();
mUI.mLibraries->clear();
for (const QString &lib : libs) {
QListWidgetItem* item = new QListWidgetItem(lib, mUI.mLibraries);
@ -170,7 +170,7 @@ ProjectFileDialog::ProjectFileDialog(ProjectFile *projectFile, QWidget *parent)
platformFiles << platformFile;
}
}
qSort(platformFiles);
platformFiles.sort();
mUI.mComboBoxPlatform->addItems(platformFiles);
mUI.mEditTags->setValidator(new QRegExpValidator(QRegExp("[a-zA-Z0-9 ;]*"),this));