GUI: Fix a few Wdeprecated warnings
This commit is contained in:
parent
70e0c66c35
commit
896d953aa3
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue