diff --git a/src/checkforupdatesdialog.cpp b/src/checkforupdatesdialog.cpp index cbdd56f01e..86a90db843 100644 --- a/src/checkforupdatesdialog.cpp +++ b/src/checkforupdatesdialog.cpp @@ -232,7 +232,7 @@ CheckForUpdatesDialog::CheckForUpdatesDialog(const QString &pApplicationDate, //============================================================================== CheckForUpdatesDialog::CheckForUpdatesDialog(CheckForUpdatesEngine *pEngine) : - CheckForUpdatesDialog(QString(), pEngine, nullptr) + CheckForUpdatesDialog({}, pEngine, nullptr) { } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8db87adabe..0531e4bcae 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -742,7 +742,7 @@ void MainWindow::loadSettings() // Retrieve the state of the docked windows - mDockedWindowsState = settings.value(SettingsDockedWindowsState, QByteArray()).toByteArray(); + mDockedWindowsState = settings.value(SettingsDockedWindowsState, {}).toByteArray(); // Remove the File menu when on macOS, should no plugins be loaded // Note: our File menu should only contain the Exit menu item, but on macOS diff --git a/src/misc/openfile.cpp.inl b/src/misc/openfile.cpp.inl index 4451ea86ef..8dedf701f3 100644 --- a/src/misc/openfile.cpp.inl +++ b/src/misc/openfile.cpp.inl @@ -79,7 +79,7 @@ QString cliOpenFile(const QString &pFileName, File::Type pType, int fileTabIndex = mFileTabs->currentIndex()+1; mFileNames.insert(fileTabIndex, fileName); - mFileTabs->insertTab(fileTabIndex, QString()); + mFileTabs->insertTab(fileTabIndex, {}); updateFileTab(fileTabIndex); diff --git a/src/misc/openremotefile.cpp.inl b/src/misc/openremotefile.cpp.inl index 4cf5aed770..da3bd1ee2d 100644 --- a/src/misc/openremotefile.cpp.inl +++ b/src/misc/openremotefile.cpp.inl @@ -19,7 +19,7 @@ QString cliOpenRemoteFile(const QString &pUrl) // so open the file as a local file and leave #ifdef GUI_SUPPORT - return openFile(fileNameOrUrl, File::Type::Local, QString(), pShowWarning); + return openFile(fileNameOrUrl, File::Type::Local, {}, pShowWarning); #else return cliOpenFile(fileNameOrUrl); #endif diff --git a/src/misc/opensimulation.cpp.inl b/src/misc/opensimulation.cpp.inl index 4ceaae3fca..ba213611c8 100644 --- a/src/misc/opensimulation.cpp.inl +++ b/src/misc/opensimulation.cpp.inl @@ -31,8 +31,7 @@ static PyObject * openSimulation(PyObject *pSelf, PyObject *pArgs) QString error = isLocalFile? #ifdef GUI_SUPPORT Core::guiOpenFile(fileNameOrUrl, - Core::File::Type::Local, - QString(), false): + Core::File::Type::Local, {}, false): Core::guiOpenRemoteFile(fileNameOrUrl, false); #else Core::cliOpenFile(fileNameOrUrl): diff --git a/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewcellmllistwidget.cpp b/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewcellmllistwidget.cpp index 21f5e410fb..250cbab21b 100644 --- a/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewcellmllistwidget.cpp +++ b/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewcellmllistwidget.cpp @@ -138,7 +138,7 @@ CellmlAnnotationViewCellmlElementItem::CellmlAnnotationViewCellmlElementItem(Typ CellmlAnnotationViewCellmlElementItem::CellmlAnnotationViewCellmlElementItem(Type pType, iface::cellml_api::CellMLElement *pElement, int pNumber) : - CellmlAnnotationViewCellmlElementItem(false, pType, QString(), pElement, pNumber) + CellmlAnnotationViewCellmlElementItem(false, pType, {}, pElement, pNumber) { // Set the text for some types @@ -930,7 +930,7 @@ void CellmlAnnotationViewCellmlListWidget::removeCurrentMetadata() // Re-update the metadata details view now that the current node doesn't // have any metadata associated with it - updateMetadataDetails(mTreeViewWidget->currentIndex(), QModelIndex()); + updateMetadataDetails(mTreeViewWidget->currentIndex(), {}); } //============================================================================== @@ -944,7 +944,7 @@ void CellmlAnnotationViewCellmlListWidget::removeAllMetadata() // Re-update the metadata details view now that the CellML file doesn't have // any metadata associated with it - updateMetadataDetails(mTreeViewWidget->currentIndex(), QModelIndex()); + updateMetadataDetails(mTreeViewWidget->currentIndex(), {}); } //============================================================================== diff --git a/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewmetadatadetailswidget.cpp b/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewmetadatadetailswidget.cpp index 55cc82f21f..3b24ee798b 100644 --- a/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewmetadatadetailswidget.cpp +++ b/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewmetadatadetailswidget.cpp @@ -56,7 +56,7 @@ CellmlAnnotationViewMetadataDetailsWidget::CellmlAnnotationViewMetadataDetailsWi auto layout = new QVBoxLayout(this); - layout->setContentsMargins(QMargins()); + layout->setContentsMargins({}); layout->setSpacing(0); setLayout(layout); diff --git a/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewmetadataeditdetailswidget.cpp b/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewmetadataeditdetailswidget.cpp index 52ffe8b3d6..f8cde4a0ab 100644 --- a/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewmetadataeditdetailswidget.cpp +++ b/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewmetadataeditdetailswidget.cpp @@ -174,7 +174,7 @@ CellmlAnnotationViewMetadataEditDetailsWidget::CellmlAnnotationViewMetadataEditD auto qualifierWidget = new QWidget(formWidget); auto qualifierWidgetLayout = new QHBoxLayout(qualifierWidget); - qualifierWidgetLayout->setContentsMargins(QMargins()); + qualifierWidgetLayout->setContentsMargins({}); qualifierWidget->setLayout(qualifierWidgetLayout); @@ -215,7 +215,7 @@ CellmlAnnotationViewMetadataEditDetailsWidget::CellmlAnnotationViewMetadataEditD auto termWidget = new QWidget(formWidget); auto termWidgetLayout = new QHBoxLayout(termWidget); - termWidgetLayout->setContentsMargins(QMargins()); + termWidgetLayout->setContentsMargins({}); termWidget->setLayout(termWidgetLayout); @@ -405,8 +405,7 @@ void CellmlAnnotationViewMetadataEditDetailsWidget::updateGui(iface::cellml_api: if ( (pResetItemsGui && !mAnnotationWidget->isBusyWidgetVisible()) || termIsDirect) { - updateItemsGui(CellmlAnnotationViewMetadataEditDetailsItems(), - !termIsDirect && !pFilePermissionsChanged); + updateItemsGui({}, !termIsDirect && !pFilePermissionsChanged); } // Enable or disable the add buttons for our retrieved terms, depending on @@ -460,7 +459,7 @@ void CellmlAnnotationViewMetadataEditDetailsWidget::upudateOutputMessage(bool pL mOutputMessage->setIconMessage(":/oxygen/actions/help-hint.png", tr("Enter a term above...")); } else if (pLookUpTerm) { - mOutputMessage->setIconMessage(QString(), QString()); + mOutputMessage->setIconMessage({}, {}); if (pShowBusyWidget != nullptr) { *pShowBusyWidget = true; @@ -534,7 +533,7 @@ void CellmlAnnotationViewMetadataEditDetailsWidget::updateItemsGui(const CellmlA mItemsMapping.clear(); mEnabledItems.clear(); - mOutputOntologicalTerms->webView()->setHtml(QString()); + mOutputOntologicalTerms->webView()->setHtml({}); // Populate our Web view, but only if there is at least one item @@ -1061,8 +1060,7 @@ void CellmlAnnotationViewMetadataEditDetailsWidget::addTerm() // Update our items' GUI - updateItemsGui(CellmlAnnotationViewMetadataEditDetailsItems(), - !isDirectTerm(mTermValue->text())); + updateItemsGui({}, !isDirectTerm(mTermValue->text())); // Ask our parent to update its GUI with the added RDF triple diff --git a/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewmetadatanormalviewdetailswidget.cpp b/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewmetadatanormalviewdetailswidget.cpp index 3dd61ab55b..852779fe64 100644 --- a/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewmetadatanormalviewdetailswidget.cpp +++ b/src/plugins/editing/CellMLAnnotationView/src/cellmlannotationviewmetadatanormalviewdetailswidget.cpp @@ -239,7 +239,7 @@ void CellmlAnnotationViewMetadataNormalViewDetailsWidget::updateGui(iface::cellm addRdfTriple(rdfTriple, false); } } else { - mOutputOntologicalTerms->webView()->setHtml(QString()); + mOutputOntologicalTerms->webView()->setHtml({}); } // Do additional GUI updates @@ -323,7 +323,7 @@ void CellmlAnnotationViewMetadataNormalViewDetailsWidget::addRdfTriple(CellMLSup if (pNeedAdditionalGuiUpdates) { mLookUpRdfTripleInformation = Information::Last; - additionalGuiUpdates(QString(), InformationType::None, mLookUpRdfTripleInformation); + additionalGuiUpdates({}, InformationType::None, mLookUpRdfTripleInformation); } } diff --git a/src/plugins/editing/CellMLTextView/src/cellmltextviewconverter.cpp b/src/plugins/editing/CellMLTextView/src/cellmltextviewconverter.cpp index 25eb8b8ed0..534022f846 100644 --- a/src/plugins/editing/CellMLTextView/src/cellmltextviewconverter.cpp +++ b/src/plugins/editing/CellMLTextView/src/cellmltextviewconverter.cpp @@ -1892,7 +1892,7 @@ QString CellMLTextViewConverter::processPowerNode(const QDomNode &pDomNode, static const QRegularExpression UnitRegEx = QRegularExpression("{[^}]*}$"); - double n = QString(b).replace(UnitRegEx, QString()).toDouble(); + double n = QString(b).replace(UnitRegEx, {}).toDouble(); if (n == 2.0) { res = "sqr("+a+")"; @@ -1977,7 +1977,7 @@ QString CellMLTextViewConverter::processRootNode(const QDomNode &pDomNode, static const QRegularExpression UnitRegEx = QRegularExpression("{[^}]*}$"); - double n = QString(b).replace(UnitRegEx, QString()).toDouble(); + double n = QString(b).replace(UnitRegEx, {}).toDouble(); if (n == 2.0) { res = "sqrt("+a+")"; diff --git a/src/plugins/editing/CellMLTextView/src/cellmltextviewwidget.cpp b/src/plugins/editing/CellMLTextView/src/cellmltextviewwidget.cpp index 625cf70fae..fadae009a6 100644 --- a/src/plugins/editing/CellMLTextView/src/cellmltextviewwidget.cpp +++ b/src/plugins/editing/CellMLTextView/src/cellmltextviewwidget.cpp @@ -1220,7 +1220,7 @@ void CellmlTextViewWidget::updateViewer() mContentMathmlEquation = QString(); - mEditingWidget->mathmlViewer()->setContents(QString()); + mEditingWidget->mathmlViewer()->setContents({}); } else { // There is a statement, so try to parse it diff --git a/src/plugins/editing/CellMLTextView/tests/parsingtests.cpp b/src/plugins/editing/CellMLTextView/tests/parsingtests.cpp index 0b0d2d2d1d..8e87bc738c 100644 --- a/src/plugins/editing/CellMLTextView/tests/parsingtests.cpp +++ b/src/plugins/editing/CellMLTextView/tests/parsingtests.cpp @@ -47,7 +47,7 @@ void ParsingTests::basicTests() // Various tests on a minimal model definition - QVERIFY(!parser.execute(QString(), + QVERIFY(!parser.execute({}, OpenCOR::CellMLSupport::CellmlFile::Version::Cellml_1_0)); QCOMPARE(parser.messages().first().type(), OpenCOR::CellMLTextView::CellmlTextViewParserMessage::Type::Error); QCOMPARE(parser.messages().first().message(), QString("'def' is expected, but the end of the file was found instead.")); diff --git a/src/plugins/editing/RawCellMLView/src/rawcellmlviewwidget.cpp b/src/plugins/editing/RawCellMLView/src/rawcellmlviewwidget.cpp index fe94d602bd..3a79e2737b 100644 --- a/src/plugins/editing/RawCellMLView/src/rawcellmlviewwidget.cpp +++ b/src/plugins/editing/RawCellMLView/src/rawcellmlviewwidget.cpp @@ -579,7 +579,7 @@ void RawCellmlViewWidget::updateViewer() if (!foundMathmlBlock || !hasContentMathmlEquation) { mContentMathmlEquation = QString(); - mEditingWidget->mathmlViewer()->setContents(QString()); + mEditingWidget->mathmlViewer()->setContents({}); } } diff --git a/src/plugins/miscellaneous/Core/src/borderedwidget.cpp b/src/plugins/miscellaneous/Core/src/borderedwidget.cpp index 74f02f3835..dd94980112 100644 --- a/src/plugins/miscellaneous/Core/src/borderedwidget.cpp +++ b/src/plugins/miscellaneous/Core/src/borderedwidget.cpp @@ -50,7 +50,7 @@ BorderedWidget::BorderedWidget(QWidget *pWidget, bool pTop, bool pLeft, auto gridLayout = new QGridLayout(this); - gridLayout->setContentsMargins(QMargins()); + gridLayout->setContentsMargins({}); gridLayout->setSpacing(0); setLayout(gridLayout); diff --git a/src/plugins/miscellaneous/Core/src/centralwidget.cpp b/src/plugins/miscellaneous/Core/src/centralwidget.cpp index 7f20ee212b..ce018c983b 100644 --- a/src/plugins/miscellaneous/Core/src/centralwidget.cpp +++ b/src/plugins/miscellaneous/Core/src/centralwidget.cpp @@ -137,7 +137,7 @@ CentralWidget::CentralWidget(QWidget *pParent) : auto layout = new QHBoxLayout(this); - layout->setContentsMargins(QMargins()); + layout->setContentsMargins({}); layout->setSpacing(0); setLayout(layout); @@ -198,7 +198,7 @@ CentralWidget::CentralWidget(QWidget *pParent) : auto centralWidget = new QWidget(this); auto centralWidgetVBoxLayout = new QVBoxLayout(centralWidget); - centralWidgetVBoxLayout->setContentsMargins(QMargins()); + centralWidgetVBoxLayout->setContentsMargins({}); centralWidgetVBoxLayout->setSpacing(0); centralWidget->setLayout(centralWidgetVBoxLayout); @@ -409,7 +409,7 @@ void CentralWidget::loadSettings(QSettings &pSettings) fileMode = mModeTabIndexModes.value(i); CentralWidgetMode *mode = mModes.value(fileMode); - QString viewPluginName = pSettings.value(QString(SettingsFileModeView).arg(QString(), + QString viewPluginName = pSettings.value(QString(SettingsFileModeView).arg({}, ViewInterface::modeAsString(fileMode))).toString(); Plugins viewPlugins = mode->viewPlugins(); @@ -514,7 +514,7 @@ void CentralWidget::saveSettings(QSettings &pSettings) const ViewInterface::Mode fileMode = mModeTabIndexModes.value(i); CentralWidgetMode *mode = mModes.value(fileMode); - pSettings.setValue(QString(SettingsFileModeView).arg(QString(), + pSettings.setValue(QString(SettingsFileModeView).arg({}, ViewInterface::modeAsString(fileMode)), mode->viewPlugins()[mode->viewTabs()->currentIndex()]->name()); } @@ -1381,7 +1381,7 @@ void CentralWidget::addView(Plugin *pPlugin) if (!mModes.value(viewMode)->isEnabled()) { // There is no tab for the mode, so add one and enable it - int tabIndex = mModeTabs->addTab(QString()); + int tabIndex = mModeTabs->addTab({}); mModes.value(viewMode)->setEnabled(true); @@ -1396,7 +1396,7 @@ void CentralWidget::addView(Plugin *pPlugin) CentralWidgetMode *mode = mModes.value(viewMode); mode->addViewPlugin(pPlugin); - mode->viewTabs()->addTab(QString()); + mode->viewTabs()->addTab({}); } //============================================================================== @@ -1989,13 +1989,13 @@ void CentralWidget::updateModifiedSettings() // tabs mModeTabs->setEnabled(true); - mModeTabs->setToolTip(QString()); + mModeTabs->setToolTip({}); for (auto mode : mModes) { TabBarWidget *viewTabs = mode->viewTabs(); viewTabs->setEnabled(true); - viewTabs->setToolTip(QString()); + viewTabs->setToolTip({}); } // Enable/disable the Mode tabs and the current mode's View tabs, in case diff --git a/src/plugins/miscellaneous/Core/src/collapsiblewidget.cpp b/src/plugins/miscellaneous/Core/src/collapsiblewidget.cpp index fc66366d63..27c37fa2ab 100644 --- a/src/plugins/miscellaneous/Core/src/collapsiblewidget.cpp +++ b/src/plugins/miscellaneous/Core/src/collapsiblewidget.cpp @@ -67,7 +67,7 @@ CollapsibleHeaderWidget::CollapsibleHeaderWidget(bool pCollapsible, auto layout = new QVBoxLayout(this); - layout->setContentsMargins(QMargins()); + layout->setContentsMargins({}); layout->setSpacing(0); setLayout(layout); @@ -77,7 +77,7 @@ CollapsibleHeaderWidget::CollapsibleHeaderWidget(bool pCollapsible, auto subWidget = new QWidget(this); auto subLayout = new QHBoxLayout(subWidget); - subLayout->setContentsMargins(QMargins()); + subLayout->setContentsMargins({}); subLayout->setSpacing(0); subWidget->setLayout(subLayout); @@ -292,13 +292,13 @@ void CollapsibleHeaderWidget::showMenu() //============================================================================== CollapsibleWidget::CollapsibleWidget(QWidget *pParent) : - Widget(QSize(), pParent) + Widget({}, pParent) { // Create a vertical layout that will contain our headers and widgets mLayout = new QVBoxLayout(this); - mLayout->setContentsMargins(QMargins()); + mLayout->setContentsMargins({}); mLayout->setSpacing(0); setLayout(mLayout); diff --git a/src/plugins/miscellaneous/Core/src/corecliutils.cpp b/src/plugins/miscellaneous/Core/src/corecliutils.cpp index 8cdb4ba1ff..e77d9806ce 100644 --- a/src/plugins/miscellaneous/Core/src/corecliutils.cpp +++ b/src/plugins/miscellaneous/Core/src/corecliutils.cpp @@ -821,7 +821,7 @@ QString newFileName(const QString &pFileName, const QString &pExtra, { // Return the name of a 'new' file - return newFileName(pFileName, pExtra, pBefore, QString()); + return newFileName(pFileName, pExtra, pBefore, {}); } //============================================================================== @@ -830,7 +830,7 @@ QString newFileName(const QString &pFileName, const QString &pFileExtension) { // Return the name of a 'new' file - return newFileName(pFileName, QString(), true, pFileExtension); + return newFileName(pFileName, {}, true, pFileExtension); } //============================================================================== @@ -1037,7 +1037,7 @@ QStringList filters(const FileTypeInterfaces &pFileTypeInterfaces) // Convert and return as a list of strings the filters corresponding to the // given file type interfaces - return filters(pFileTypeInterfaces, false, QString()); + return filters(pFileTypeInterfaces, false, {}); } //============================================================================== diff --git a/src/plugins/miscellaneous/Core/src/coreguiutils.cpp b/src/plugins/miscellaneous/Core/src/coreguiutils.cpp index c604320fbc..c249cb1d6d 100644 --- a/src/plugins/miscellaneous/Core/src/coreguiutils.cpp +++ b/src/plugins/miscellaneous/Core/src/coreguiutils.cpp @@ -366,7 +366,7 @@ QString getSaveFileName(const QString &pCaption, const QStringList &pFilters, { // Retrieve and return a save file name - return getSaveFileName(pCaption, QString(), pFilters, pSelectedFilter); + return getSaveFileName(pCaption, {}, pFilters, pSelectedFilter); } //============================================================================== diff --git a/src/plugins/miscellaneous/Core/src/coreplugin.cpp b/src/plugins/miscellaneous/Core/src/coreplugin.cpp index 67d4d7bbf8..f25d835d24 100644 --- a/src/plugins/miscellaneous/Core/src/coreplugin.cpp +++ b/src/plugins/miscellaneous/Core/src/coreplugin.cpp @@ -58,7 +58,7 @@ PLUGININFO_FUNC CorePluginInfo() descriptions.insert("fr", QString::fromUtf8("l'extension de base.")); return new PluginInfo(PluginInfo::Category::Miscellaneous, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/miscellaneous/Core/src/progressbarwidget.cpp b/src/plugins/miscellaneous/Core/src/progressbarwidget.cpp index 5cf9d10760..abcea68aa5 100644 --- a/src/plugins/miscellaneous/Core/src/progressbarwidget.cpp +++ b/src/plugins/miscellaneous/Core/src/progressbarwidget.cpp @@ -37,7 +37,7 @@ namespace Core { //============================================================================== ProgressBarWidget::ProgressBarWidget(QWidget *pParent) : - Widget(QSize(), pParent) + Widget({}, pParent) { } diff --git a/src/plugins/miscellaneous/Core/src/propertyeditorwidget.cpp b/src/plugins/miscellaneous/Core/src/propertyeditorwidget.cpp index e233b315b2..4d753c965d 100644 --- a/src/plugins/miscellaneous/Core/src/propertyeditorwidget.cpp +++ b/src/plugins/miscellaneous/Core/src/propertyeditorwidget.cpp @@ -1568,7 +1568,7 @@ Property * PropertyEditorWidget::addSectionProperty(Property *pParent) { // Add a section property and return its information - return addSectionProperty(QString(), pParent); + return addSectionProperty({}, pParent); } //============================================================================== @@ -1591,7 +1591,7 @@ Property * PropertyEditorWidget::addStringProperty(Property *pParent) { // Add a string property and return its information - return addStringProperty(QString(), pParent); + return addStringProperty({}, pParent); } //============================================================================== @@ -1760,7 +1760,7 @@ Property * PropertyEditorWidget::addListProperty(const QStringList &pValues, { // Add a list property and return its information - return addListProperty(pValues, QString(), pParent); + return addListProperty(pValues, {}, pParent); } //============================================================================== @@ -1769,7 +1769,7 @@ Property * PropertyEditorWidget::addListProperty(Property *pParent) { // Add a list property and return its information - return addListProperty(QStringList(), QString(), pParent); + return addListProperty({}, {}, pParent); } //============================================================================== @@ -1815,7 +1815,7 @@ Property * PropertyEditorWidget::addColorProperty(Property *pParent) { // Add a colour property and return its information - return addColorProperty(QColor(), pParent); + return addColorProperty({}, pParent); } //============================================================================== diff --git a/src/plugins/miscellaneous/Core/src/treeviewwidget.cpp b/src/plugins/miscellaneous/Core/src/treeviewwidget.cpp index 741e1bfec5..94908aab38 100644 --- a/src/plugins/miscellaneous/Core/src/treeviewwidget.cpp +++ b/src/plugins/miscellaneous/Core/src/treeviewwidget.cpp @@ -137,7 +137,7 @@ void TreeViewWidget::keyPressEvent(QKeyEvent *pEvent) // Either the current item has no children or it is collapsed, // so select its parent, if it has one - if (crtIndex.parent() != QModelIndex()) { + if (crtIndex.parent().isValid()) { setCurrentIndex(crtIndex.parent()); pEvent->accept(); diff --git a/src/plugins/miscellaneous/Core/src/usermessagewidget.cpp b/src/plugins/miscellaneous/Core/src/usermessagewidget.cpp index ed7159455a..64472eac30 100644 --- a/src/plugins/miscellaneous/Core/src/usermessagewidget.cpp +++ b/src/plugins/miscellaneous/Core/src/usermessagewidget.cpp @@ -67,21 +67,21 @@ UserMessageWidget::UserMessageWidget(const QString &pIcon, UserMessageWidget::UserMessageWidget(const QString &pIcon, const QString &pMessage, QWidget *pParent) : - UserMessageWidget(pIcon, pMessage, QString(), pParent) + UserMessageWidget(pIcon, pMessage, {}, pParent) { } //============================================================================== UserMessageWidget::UserMessageWidget(const QString &pIcon, QWidget *pParent) : - UserMessageWidget(pIcon, QString(), QString(), pParent) + UserMessageWidget(pIcon, {}, {}, pParent) { } //============================================================================== UserMessageWidget::UserMessageWidget(QWidget *pParent) : - UserMessageWidget(QString(), QString(), QString(), pParent) + UserMessageWidget({}, {}, {}, pParent) { } @@ -117,7 +117,7 @@ void UserMessageWidget::updateGui() // So, instead, we retrieve a data URI for our resized icon... if (mIcon.isEmpty() && mMessage.isEmpty() && mExtraMessage.isEmpty()) { - setText(QString()); + setText({}); } else { static const QString Message = "\n" " \n" @@ -204,7 +204,7 @@ void UserMessageWidget::resetMessage() { // Reset our message - setIconMessage(QString(), QString()); + setIconMessage({}, {}); } //============================================================================== diff --git a/src/plugins/miscellaneous/Core/src/widget.cpp b/src/plugins/miscellaneous/Core/src/widget.cpp index 6a1fd1c24b..dbe89ab1a0 100644 --- a/src/plugins/miscellaneous/Core/src/widget.cpp +++ b/src/plugins/miscellaneous/Core/src/widget.cpp @@ -82,7 +82,7 @@ QLayout * Widget::createLayout(Layout pLayoutType) break; } - layout->setContentsMargins(QMargins()); + layout->setContentsMargins({}); if ((pLayoutType == Layout::Vertical) || (pLayoutType == Layout::Horizontal)) { layout->setSpacing(0); diff --git a/src/plugins/organisation/FileBrowserWindow/src/filebrowserwindowmodel.cpp b/src/plugins/organisation/FileBrowserWindow/src/filebrowserwindowmodel.cpp index ec59cd17fc..e7ee9f6586 100644 --- a/src/plugins/organisation/FileBrowserWindow/src/filebrowserwindowmodel.cpp +++ b/src/plugins/organisation/FileBrowserWindow/src/filebrowserwindowmodel.cpp @@ -35,7 +35,7 @@ FileBrowserWindowModel::FileBrowserWindowModel(QObject *pParent) : { // We want access to the full file system - setRootPath(QString()); + setRootPath({}); } //============================================================================== diff --git a/src/plugins/organisation/PMRWindow/src/pmrwindowwidget.cpp b/src/plugins/organisation/PMRWindow/src/pmrwindowwidget.cpp index f1d9289ca5..16d50bbb15 100644 --- a/src/plugins/organisation/PMRWindow/src/pmrwindowwidget.cpp +++ b/src/plugins/organisation/PMRWindow/src/pmrwindowwidget.cpp @@ -110,7 +110,7 @@ PmrWindowWidget::PmrWindowWidget(QWidget *pParent) : auto layout = new QVBoxLayout(this); - layout->setContentsMargins(QMargins()); + layout->setContentsMargins({}); setLayout(layout); diff --git a/src/plugins/organisation/PMRWindow/src/pmrwindowwindow.cpp b/src/plugins/organisation/PMRWindow/src/pmrwindowwindow.cpp index 101e186b35..b396b1732f 100644 --- a/src/plugins/organisation/PMRWindow/src/pmrwindowwindow.cpp +++ b/src/plugins/organisation/PMRWindow/src/pmrwindowwindow.cpp @@ -228,7 +228,7 @@ void PmrWindowWindow::update(const QString &pPmrUrl) if (pPmrUrl != mPmrUrl) { if (mPmrWindowWidget->hasExposures()) { - mPmrWindowWidget->initialize(PMRSupport::PmrExposures(), QString(), QString()); + mPmrWindowWidget->initialize(PMRSupport::PmrExposures(), {}, {}); } busy(false, true); @@ -349,7 +349,7 @@ void PmrWindowWindow::showError(const QString &pMessage) if (mPmrWindowWidget->hasExposures()) { Core::criticalMessageBox(windowTitle(), pMessage); } else { - mPmrWindowWidget->initialize(PMRSupport::PmrExposures(), QString(), pMessage); + mPmrWindowWidget->initialize(PMRSupport::PmrExposures(), {}, pMessage); } } @@ -368,7 +368,7 @@ void PmrWindowWindow::initializeWidget(const PMRSupport::PmrExposures &pExposure { // Ask our PMR widget to initialise itself - mPmrWindowWidget->initialize(pExposures, mFilterValue->text(), QString()); + mPmrWindowWidget->initialize(pExposures, mFilterValue->text(), {}); } //============================================================================== diff --git a/src/plugins/organisation/PMRWorkspacesWindow/src/pmrworkspaceswindowsynchronizedialog.cpp b/src/plugins/organisation/PMRWorkspacesWindow/src/pmrworkspaceswindowsynchronizedialog.cpp index ee907f1aee..49b5210e06 100644 --- a/src/plugins/organisation/PMRWorkspacesWindow/src/pmrworkspaceswindowsynchronizedialog.cpp +++ b/src/plugins/organisation/PMRWorkspacesWindow/src/pmrworkspaceswindowsynchronizedialog.cpp @@ -869,11 +869,7 @@ QString PmrWorkspacesWindowSynchronizeDialog::diffHtml(const QString &pOld, removeLineNumber = QString(difference).remove(BeforeRemoveLineNumberRegEx).remove(AfterLineNumberRegEx).toInt()-1; - html += QString(Row).arg("header", - "...", - "...", - QString(), - difference); + html += QString(Row).arg("header", "...", "...", {}, difference); } else { QString diff = difference; QChar tag = diff[0]; @@ -884,14 +880,12 @@ QString PmrWorkspacesWindowSynchronizeDialog::diffHtml(const QString &pOld, ++addLineNumber; differencesData << differenceData((differenceNumber == differenceMaxNumber)?"last add":"add", - QString(), QString::number(addLineNumber), - '+', diff); + {}, QString::number(addLineNumber), '+', diff); } else if (tag == '-') { ++removeLineNumber; differencesData << differenceData((differenceNumber == differenceMaxNumber)?"last remove":"remove", - QString::number(removeLineNumber), QString(), - '-', diff); + QString::number(removeLineNumber), {}, '-', diff); } else if (addLineNumber != addMaxLineNumber) { // Output any differences data that we may have @@ -907,8 +901,7 @@ QString PmrWorkspacesWindowSynchronizeDialog::diffHtml(const QString &pOld, "default") .arg(removeLineNumber) .arg(addLineNumber) - .arg(QString(), - cleanHtmlEscaped(diff)); + .arg({}, cleanHtmlEscaped(diff)); } } } diff --git a/src/plugins/organisation/PMRWorkspacesWindow/src/pmrworkspaceswindowwidget.cpp b/src/plugins/organisation/PMRWorkspacesWindow/src/pmrworkspaceswindowwidget.cpp index d389f76983..53166b9cc3 100644 --- a/src/plugins/organisation/PMRWorkspacesWindow/src/pmrworkspaceswindowwidget.cpp +++ b/src/plugins/organisation/PMRWorkspacesWindow/src/pmrworkspaceswindowwidget.cpp @@ -131,7 +131,7 @@ PmrWorkspacesWindowItem::PmrWorkspacesWindowItem(Type pType, const QIcon &pIcon) : PmrWorkspacesWindowItem(pType, pTreeViewWidget, pTreeViewProxyModel, pWorkspace, pFileNode, pIcon, pFileNode->name(), - QIcon(), QIcon()) + {}, {}) { } @@ -281,7 +281,7 @@ PmrWorkspacesWindowWidget::PmrWorkspacesWindowWidget(const QString &pPmrUrl, auto layout = new QVBoxLayout(this); - layout->setContentsMargins(QMargins()); + layout->setContentsMargins({}); setLayout(layout); @@ -834,7 +834,7 @@ void PmrWorkspacesWindowWidget::initialize(const PMRSupport::PmrWorkspaces &pWor { // Initialise ourselves using the given workspaces - initialize(pWorkspaces, Message::None, QString(), true); + initialize(pWorkspaces, Message::None, {}, true); } //============================================================================== @@ -843,7 +843,7 @@ void PmrWorkspacesWindowWidget::initialize() { // Initialise ourselves - initialize(PMRSupport::PmrWorkspaces(), Message::None, QString(), false); + initialize(PMRSupport::PmrWorkspaces(), Message::None, {}, false); } //============================================================================== diff --git a/src/plugins/sample/Sample/src/sampleplugin.cpp b/src/plugins/sample/Sample/src/sampleplugin.cpp index d61b6ed30e..84d8a18a5a 100644 --- a/src/plugins/sample/Sample/src/sampleplugin.cpp +++ b/src/plugins/sample/Sample/src/sampleplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC SamplePluginInfo() descriptions.insert("fr", QString::fromUtf8("une extension qui fournit une fonction d'addition.")); return new PluginInfo(PluginInfo::Category::Sample, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelandgraphswidget.cpp b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelandgraphswidget.cpp index 627719d71b..a11203ef76 100644 --- a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelandgraphswidget.cpp +++ b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelandgraphswidget.cpp @@ -1654,7 +1654,7 @@ void SimulationExperimentViewInformationGraphPanelAndGraphsWidget::updateGraphsI modelListValues.sort(Qt::CaseInsensitive); - modelListValues.prepend(QString()); + modelListValues.prepend({}); modelListValues.prepend(tr("Current")); } diff --git a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationwidget.cpp b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationwidget.cpp index cb7874fee2..3c1503dd6b 100644 --- a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationwidget.cpp +++ b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationwidget.cpp @@ -51,7 +51,7 @@ SimulationExperimentViewInformationWidget::SimulationExperimentViewInformationWi auto layout = new QVBoxLayout(this); - layout->setContentsMargins(QMargins()); + layout->setContentsMargins({}); layout->setSpacing(0); setLayout(layout); diff --git a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewsimulationwidget.cpp b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewsimulationwidget.cpp index 24e79e3677..0b0640be7f 100644 --- a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewsimulationwidget.cpp +++ b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewsimulationwidget.cpp @@ -491,7 +491,7 @@ SimulationExperimentViewSimulationWidget::SimulationExperimentViewSimulationWidg auto simulationOutputWidget = new QWidget(this); auto simulationOutputLayout= new QVBoxLayout(simulationOutputWidget); - simulationOutputLayout->setContentsMargins(QMargins()); + simulationOutputLayout->setContentsMargins({}); simulationOutputLayout->setSpacing(0); simulationOutputWidget->setLayout(simulationOutputLayout); @@ -2206,7 +2206,7 @@ void SimulationExperimentViewSimulationWidget::sedmlExportSedmlFile() { // Export the simulation to a SED-ML file - sedmlExportSedmlFile(QString()); + sedmlExportSedmlFile({}); } //============================================================================== @@ -2386,7 +2386,7 @@ void SimulationExperimentViewSimulationWidget::sedmlExportCombineArchive() { // Export the simulation to a COMBINE archive - sedmlExportCombineArchive(QString()); + sedmlExportCombineArchive({}); } //============================================================================== @@ -2677,7 +2677,7 @@ GraphPanelWidget::GraphPanelPlotGraphProperties SimulationExperimentViewSimulati { // Return our default graph properties - return defaultGraphProperties(QString(), pColor); + return defaultGraphProperties({}, pColor); } //============================================================================== diff --git a/src/plugins/solver/CVODESolver/src/cvodesolverplugin.cpp b/src/plugins/solver/CVODESolver/src/cvodesolverplugin.cpp index 36c5fcbc30..29c7d007f6 100644 --- a/src/plugins/solver/CVODESolver/src/cvodesolverplugin.cpp +++ b/src/plugins/solver/CVODESolver/src/cvodesolverplugin.cpp @@ -277,17 +277,17 @@ Solver::Properties CVODESolverPlugin::solverProperties() const QStringList PreconditionerListValues = { NoPreconditioner, BandedPreconditioner }; - return Solver::Properties() << Solver::Property(Solver::Property::Type::DoubleGe0, MaximumStepId, MaximumStepDescriptions, QStringList(), MaximumStepDefaultValue, true) - << Solver::Property(Solver::Property::Type::IntegerGt0, MaximumNumberOfStepsId, MaximumNumberOfStepsDescriptions, QStringList(), MaximumNumberOfStepsDefaultValue, false) - << Solver::Property(Solver::Property::Type::List, IntegrationMethodId, IntegrationMethodDescriptions, IntegrationMethodListValues, IntegrationMethodDefaultValue, false) - << Solver::Property(Solver::Property::Type::List, IterationTypeId, IterationTypeDescriptions, IterationTypeListValues, IterationTypeDefaultValue, false) - << Solver::Property(Solver::Property::Type::List, LinearSolverId, LinearSolverDescriptions, LinearSolverListValues, LinearSolverDefaultValue, false) - << Solver::Property(Solver::Property::Type::List, PreconditionerId, PreconditionerDescriptions, PreconditionerListValues, PreconditionerDefaultValue, false) - << Solver::Property(Solver::Property::Type::IntegerGe0, UpperHalfBandwidthId, UpperHalfBandwidthDescriptions, QStringList(), UpperHalfBandwidthDefaultValue, false) - << Solver::Property(Solver::Property::Type::IntegerGe0, LowerHalfBandwidthId, LowerHalfBandwidthDescriptions, QStringList(), LowerHalfBandwidthDefaultValue, false) - << Solver::Property(Solver::Property::Type::DoubleGe0, RelativeToleranceId, RelativeToleranceDescriptions, QStringList(), RelativeToleranceDefaultValue, false) - << Solver::Property(Solver::Property::Type::DoubleGt0, AbsoluteToleranceId, AbsoluteToleranceDescriptions, QStringList(), AbsoluteToleranceDefaultValue, false) - << Solver::Property(Solver::Property::Type::Boolean, InterpolateSolutionId, InterpolateSolutionDescriptions, QStringList(), InterpolateSolutionDefaultValue, false); + return { Solver::Property(Solver::Property::Type::DoubleGe0, MaximumStepId, MaximumStepDescriptions, {}, MaximumStepDefaultValue, true), + Solver::Property(Solver::Property::Type::IntegerGt0, MaximumNumberOfStepsId, MaximumNumberOfStepsDescriptions, {}, MaximumNumberOfStepsDefaultValue, false), + Solver::Property(Solver::Property::Type::List, IntegrationMethodId, IntegrationMethodDescriptions, IntegrationMethodListValues, IntegrationMethodDefaultValue, false), + Solver::Property(Solver::Property::Type::List, IterationTypeId, IterationTypeDescriptions, IterationTypeListValues, IterationTypeDefaultValue, false), + Solver::Property(Solver::Property::Type::List, LinearSolverId, LinearSolverDescriptions, LinearSolverListValues, LinearSolverDefaultValue, false), + Solver::Property(Solver::Property::Type::List, PreconditionerId, PreconditionerDescriptions, PreconditionerListValues, PreconditionerDefaultValue, false), + Solver::Property(Solver::Property::Type::IntegerGe0, UpperHalfBandwidthId, UpperHalfBandwidthDescriptions, {}, UpperHalfBandwidthDefaultValue, false), + Solver::Property(Solver::Property::Type::IntegerGe0, LowerHalfBandwidthId, LowerHalfBandwidthDescriptions, {}, LowerHalfBandwidthDefaultValue, false), + Solver::Property(Solver::Property::Type::DoubleGe0, RelativeToleranceId, RelativeToleranceDescriptions, {}, RelativeToleranceDefaultValue, false), + Solver::Property(Solver::Property::Type::DoubleGt0, AbsoluteToleranceId, AbsoluteToleranceDescriptions, {}, AbsoluteToleranceDefaultValue, false), + Solver::Property(Solver::Property::Type::Boolean, InterpolateSolutionId, InterpolateSolutionDescriptions, {}, InterpolateSolutionDefaultValue, false) }; } //============================================================================== diff --git a/src/plugins/solver/ForwardEulerSolver/src/forwardeulersolverplugin.cpp b/src/plugins/solver/ForwardEulerSolver/src/forwardeulersolverplugin.cpp index 1917eaaf03..785bf764fb 100644 --- a/src/plugins/solver/ForwardEulerSolver/src/forwardeulersolverplugin.cpp +++ b/src/plugins/solver/ForwardEulerSolver/src/forwardeulersolverplugin.cpp @@ -39,7 +39,7 @@ PLUGININFO_FUNC ForwardEulerSolverPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension qui implémente la méthode Forward Euler pour résoudre des EDOs.)")); return new PluginInfo(PluginInfo::Category::Solver, true, false, - QStringList(), + {}, descriptions); } @@ -132,7 +132,7 @@ Solver::Properties ForwardEulerSolverPlugin::solverProperties() const stepDescriptions.insert("en", QString::fromUtf8("Step")); stepDescriptions.insert("fr", QString::fromUtf8("Pas")); - return Solver::Properties() << Solver::Property(Solver::Property::Type::DoubleGt0, StepId, stepDescriptions, QStringList(), StepDefaultValue, true); + return { Solver::Property(Solver::Property::Type::DoubleGt0, StepId, stepDescriptions, {}, StepDefaultValue, true) }; } //============================================================================== diff --git a/src/plugins/solver/FourthOrderRungeKuttaSolver/src/fourthorderrungekuttasolverplugin.cpp b/src/plugins/solver/FourthOrderRungeKuttaSolver/src/fourthorderrungekuttasolverplugin.cpp index 07eaf1a05c..96ae0275a8 100644 --- a/src/plugins/solver/FourthOrderRungeKuttaSolver/src/fourthorderrungekuttasolverplugin.cpp +++ b/src/plugins/solver/FourthOrderRungeKuttaSolver/src/fourthorderrungekuttasolverplugin.cpp @@ -39,7 +39,7 @@ PLUGININFO_FUNC FourthOrderRungeKuttaSolverPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension qui implémente la méthode Runge-Kutta du quatrième ordre pour résoudre des EDOs.)")); return new PluginInfo(PluginInfo::Category::Solver, true, false, - QStringList(), + {}, descriptions); } @@ -132,7 +132,7 @@ Solver::Properties FourthOrderRungeKuttaSolverPlugin::solverProperties() const stepDescriptions.insert("en", QString::fromUtf8("Step")); stepDescriptions.insert("fr", QString::fromUtf8("Pas")); - return Solver::Properties() << Solver::Property(Solver::Property::Type::DoubleGt0, StepId, stepDescriptions, QStringList(), StepDefaultValue, true); + return { Solver::Property(Solver::Property::Type::DoubleGt0, StepId, stepDescriptions, {}, StepDefaultValue, true) }; } //============================================================================== diff --git a/src/plugins/solver/HeunSolver/src/heunsolverplugin.cpp b/src/plugins/solver/HeunSolver/src/heunsolverplugin.cpp index 6136ef1dfb..0a3b9e189e 100644 --- a/src/plugins/solver/HeunSolver/src/heunsolverplugin.cpp +++ b/src/plugins/solver/HeunSolver/src/heunsolverplugin.cpp @@ -39,7 +39,7 @@ PLUGININFO_FUNC HeunSolverPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension qui implémente la méthode de Heun pour résoudre des EDOs.)")); return new PluginInfo(PluginInfo::Category::Solver, true, false, - QStringList(), + {}, descriptions); } @@ -132,7 +132,7 @@ Solver::Properties HeunSolverPlugin::solverProperties() const stepDescriptions.insert("en", QString::fromUtf8("Step")); stepDescriptions.insert("fr", QString::fromUtf8("Pas")); - return Solver::Properties() << Solver::Property(Solver::Property::Type::DoubleGt0, StepId, stepDescriptions, QStringList(), StepDefaultValue, true); + return { Solver::Property(Solver::Property::Type::DoubleGt0, StepId, stepDescriptions, {}, StepDefaultValue, true) }; } //============================================================================== diff --git a/src/plugins/solver/KINSOLSolver/src/kinsolsolverplugin.cpp b/src/plugins/solver/KINSOLSolver/src/kinsolsolverplugin.cpp index df1bd8e92f..6b19b87e24 100644 --- a/src/plugins/solver/KINSOLSolver/src/kinsolsolverplugin.cpp +++ b/src/plugins/solver/KINSOLSolver/src/kinsolsolverplugin.cpp @@ -177,10 +177,10 @@ Solver::Properties KINSOLSolverPlugin::solverProperties() const BiCgStabLinearSolver, TfqmrLinearSolver }; - return Solver::Properties() << Solver::Property(Solver::Property::Type::IntegerGt0, MaximumNumberOfIterationsId, MaximumNumberOfIterationsDescriptions, QStringList(), MaximumNumberOfIterationsDefaultValue, false) - << Solver::Property(Solver::Property::Type::List, LinearSolverId, LinearSolverDescriptions, LinearSolverListValues, LinearSolverDefaultValue, false) - << Solver::Property(Solver::Property::Type::IntegerGe0, UpperHalfBandwidthId, UpperHalfBandwidthDescriptions, QStringList(), UpperHalfBandwidthDefaultValue, false) - << Solver::Property(Solver::Property::Type::IntegerGe0, LowerHalfBandwidthId, LowerHalfBandwidthDescriptions, QStringList(), LowerHalfBandwidthDefaultValue, false); + return { Solver::Property(Solver::Property::Type::IntegerGt0, MaximumNumberOfIterationsId, MaximumNumberOfIterationsDescriptions, {}, MaximumNumberOfIterationsDefaultValue, false), + Solver::Property(Solver::Property::Type::List, LinearSolverId, LinearSolverDescriptions, LinearSolverListValues, LinearSolverDefaultValue, false), + Solver::Property(Solver::Property::Type::IntegerGe0, UpperHalfBandwidthId, UpperHalfBandwidthDescriptions, {}, UpperHalfBandwidthDefaultValue, false), + Solver::Property(Solver::Property::Type::IntegerGe0, LowerHalfBandwidthId, LowerHalfBandwidthDescriptions, {}, LowerHalfBandwidthDefaultValue, false) }; } //============================================================================== diff --git a/src/plugins/solver/SecondOrderRungeKuttaSolver/src/secondorderrungekuttasolverplugin.cpp b/src/plugins/solver/SecondOrderRungeKuttaSolver/src/secondorderrungekuttasolverplugin.cpp index 15e1ec054a..3d399c5cdf 100644 --- a/src/plugins/solver/SecondOrderRungeKuttaSolver/src/secondorderrungekuttasolverplugin.cpp +++ b/src/plugins/solver/SecondOrderRungeKuttaSolver/src/secondorderrungekuttasolverplugin.cpp @@ -39,7 +39,7 @@ PLUGININFO_FUNC SecondOrderRungeKuttaSolverPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension qui implémente la méthode Runge-Kutta du deuxième ordre pour résoudre des EDOs.)")); return new PluginInfo(PluginInfo::Category::Solver, true, false, - QStringList(), + {}, descriptions); } @@ -134,7 +134,7 @@ Solver::Properties SecondOrderRungeKuttaSolverPlugin::solverProperties() const stepDescriptions.insert("en", QString::fromUtf8("Step")); stepDescriptions.insert("fr", QString::fromUtf8("Pas")); - return Solver::Properties() << Solver::Property(Solver::Property::Type::DoubleGt0, StepId, stepDescriptions, QStringList(), StepDefaultValue, true); + return { Solver::Property(Solver::Property::Type::DoubleGt0, StepId, stepDescriptions, {}, StepDefaultValue, true) }; } //============================================================================== diff --git a/src/plugins/support/COMBINESupport/tests/tests.cpp b/src/plugins/support/COMBINESupport/tests/tests.cpp index 20a6c81a5c..464eb524bf 100644 --- a/src/plugins/support/COMBINESupport/tests/tests.cpp +++ b/src/plugins/support/COMBINESupport/tests/tests.cpp @@ -120,7 +120,7 @@ void Tests::basicTests() QString tempFileName = OpenCOR::Core::temporaryFileName(); - basicTests(QString()); + basicTests({}); basicTests(tempFileName); // Check that we can load our other COMBINE archive and save it in yet diff --git a/src/plugins/support/CellMLSupport/src/cellmlfile.cpp b/src/plugins/support/CellMLSupport/src/cellmlfile.cpp index 6449f05176..2556f73c16 100644 --- a/src/plugins/support/CellMLSupport/src/cellmlfile.cpp +++ b/src/plugins/support/CellMLSupport/src/cellmlfile.cpp @@ -102,7 +102,7 @@ void CellmlFile::reset() mRdfTriples.clear(); mIssues.clear(); - Core::FileManager::instance()->setDependencies(mFileName, QStringList()); + Core::FileManager::instance()->setDependencies(mFileName, {}); mLoadingNeeded = true; mFullInstantiationNeeded = true; @@ -450,7 +450,7 @@ bool CellmlFile::load() // Try to load the model - if (!load(QString(), &mModel, mIssues)) { + if (!load({}, &mModel, mIssues)) { return false; } @@ -751,7 +751,7 @@ bool CellmlFile::isValid() { // Return whether we are valid - return isValid(QString(), &mModel, mIssues); + return isValid({}, &mModel, mIssues); } //============================================================================== diff --git a/src/plugins/support/CellMLSupport/src/cellmlfileissue.cpp b/src/plugins/support/CellMLSupport/src/cellmlfileissue.cpp index c21481ed5f..3c65773454 100644 --- a/src/plugins/support/CellMLSupport/src/cellmlfileissue.cpp +++ b/src/plugins/support/CellMLSupport/src/cellmlfileissue.cpp @@ -46,7 +46,7 @@ CellmlFileIssue::CellmlFileIssue(Type pType, int pLine, int pColumn, //============================================================================== CellmlFileIssue::CellmlFileIssue(Type pType, const QString &pMessage) : - CellmlFileIssue(pType, 0, 0, pMessage, QString(), QString()) + CellmlFileIssue(pType, 0, 0, pMessage, {}, {}) { } diff --git a/src/plugins/support/CellMLSupport/src/cellmlfilerdftriple.cpp b/src/plugins/support/CellMLSupport/src/cellmlfilerdftriple.cpp index 321faafde3..f1b86f83a8 100644 --- a/src/plugins/support/CellMLSupport/src/cellmlfilerdftriple.cpp +++ b/src/plugins/support/CellMLSupport/src/cellmlfilerdftriple.cpp @@ -64,7 +64,7 @@ CellmlFileRdfTriple::CellmlFileRdfTriple(CellmlFile *pCellmlFile, iface::rdf_api::Triple *pRdfTriple) : CellmlFileRdfTriple(pCellmlFile, pRdfTriple, Type::Unknown, ModelQualifier::ModelUnknown, BioQualifier::BioUnknown, - QString(), QString()) + {}, {}) { // Retrieve the RDF triple's subject, predicate and object information diff --git a/src/plugins/support/CellMLSupport/src/cellmlfilerdftripleelement.cpp b/src/plugins/support/CellMLSupport/src/cellmlfilerdftripleelement.cpp index 75ae9a8bad..3534b9c29a 100644 --- a/src/plugins/support/CellMLSupport/src/cellmlfilerdftripleelement.cpp +++ b/src/plugins/support/CellMLSupport/src/cellmlfilerdftripleelement.cpp @@ -97,7 +97,7 @@ CellmlFileRdfTripleElement::CellmlFileRdfTripleElement(iface::rdf_api::Node *pRd mId = ids.value(id); - if (mId == QString()) { + if (mId.isEmpty()) { // There is no id value for the current id, so generate one // and keep track of it diff --git a/src/plugins/support/CellMLSupport/src/cellmlfileruntime.cpp b/src/plugins/support/CellMLSupport/src/cellmlfileruntime.cpp index 880e2f6a4e..5ead645fc6 100644 --- a/src/plugins/support/CellMLSupport/src/cellmlfileruntime.cpp +++ b/src/plugins/support/CellMLSupport/src/cellmlfileruntime.cpp @@ -607,7 +607,7 @@ void CellmlFileRuntime::importData(const QString &pName, const QStringList &pComponentHierarchy, int pIndex, double *pData) { - mParameters << new CellmlFileRuntimeParameter(pName, 0, QString(), + mParameters << new CellmlFileRuntimeParameter(pName, 0, {}, pComponentHierarchy, CellmlFileRuntimeParameter::Type::Data, pIndex, pData); diff --git a/src/plugins/support/CellMLSupport/src/cellmlsupportplugin.cpp b/src/plugins/support/CellMLSupport/src/cellmlsupportplugin.cpp index c6921dadee..b5bcf45109 100644 --- a/src/plugins/support/CellMLSupport/src/cellmlsupportplugin.cpp +++ b/src/plugins/support/CellMLSupport/src/cellmlsupportplugin.cpp @@ -253,7 +253,7 @@ void CellMLSupportPlugin::newCellmlFile() #ifdef QT_DEBUG Core::FileManager::Status createStatus = #endif - fileManagerInstance->create(QString(), + fileManagerInstance->create({}, QString( "\n" R"()""\n" " \n" diff --git a/src/plugins/support/CellMLSupport/tests/tests.cpp b/src/plugins/support/CellMLSupport/tests/tests.cpp index effc8d8a6c..8f162d498e 100644 --- a/src/plugins/support/CellMLSupport/tests/tests.cpp +++ b/src/plugins/support/CellMLSupport/tests/tests.cpp @@ -125,7 +125,7 @@ void Tests::runtimeTests() // least, several VOIs runtimeTest(OpenCOR::fileName("src/plugins/support/CellMLSupport/tests/data/calcium_transient.cellml"), - "1.1", QStringList(), false); + "1.1", {}, false); // Clean up after ourselves diff --git a/src/plugins/support/PMRSupport/src/pmrsupportpreferenceswidget.cpp b/src/plugins/support/PMRSupport/src/pmrsupportpreferenceswidget.cpp index 4d92917a65..b647d688c6 100644 --- a/src/plugins/support/PMRSupport/src/pmrsupportpreferenceswidget.cpp +++ b/src/plugins/support/PMRSupport/src/pmrsupportpreferenceswidget.cpp @@ -105,8 +105,8 @@ void PmrSupportPreferencesWidget::resetPreferences() // Reset our preferences mGui->pmrUrlValue->setCurrentText(SettingsPreferencesPmrUrlDefault); - mGui->nameValue->setText(QString()); - mGui->emailValue->setText(QString()); + mGui->nameValue->setText({}); + mGui->emailValue->setText({}); } //============================================================================== @@ -133,7 +133,7 @@ void PmrSupportPreferencesWidget::pmrUrlValueCurrentTextChanged(const QString &p } else if (pCurrentText == TeachingInstance) { mGui->noteValue->setText(tr(R"(the teaching instance is selected. The functionality of this instance should match the primary instance, but without the data persistency guarantees. While data on this instance is also not permanent, any wipes to data stored will be announced on the cellml-discussion mailing list.)")); } else { - mGui->noteValue->setText(QString()); + mGui->noteValue->setText({}); } mGui->noteLabel->setVisible(!mGui->noteValue->text().isEmpty()); diff --git a/src/plugins/support/PMRSupport/src/pmrwebservice.cpp b/src/plugins/support/PMRSupport/src/pmrwebservice.cpp index 19d38df1e9..33c28fefb6 100644 --- a/src/plugins/support/PMRSupport/src/pmrwebservice.cpp +++ b/src/plugins/support/PMRSupport/src/pmrwebservice.cpp @@ -63,7 +63,7 @@ PmrWebService::PmrWebService(const QString &pPmrUrl, QObject *pParent) : //============================================================================== PmrWebService::PmrWebService(QObject *pParent) : - PmrWebService(QString(), pParent) + PmrWebService({}, pParent) { } @@ -745,7 +745,7 @@ void PmrWebService::exposureInformationResponse(const QJsonDocument &pJsonDocume // Retrieve some information about the workspace and then clone // it - requestWorkspaceInformation(workspaceUrl, QString(), exposure); + requestWorkspaceInformation(workspaceUrl, {}, exposure); } else if ( exposureFileUrls.isEmpty() && (action == Action::RequestExposureFiles)) { emitInformation(tr("No exposure files could be found for %1.").arg(exposure->toHtml())); diff --git a/src/plugins/support/PMRSupport/src/pmrwebservicemanager.cpp b/src/plugins/support/PMRSupport/src/pmrwebservicemanager.cpp index 4ddbff0c5f..8fbac5a444 100644 --- a/src/plugins/support/PMRSupport/src/pmrwebservicemanager.cpp +++ b/src/plugins/support/PMRSupport/src/pmrwebservicemanager.cpp @@ -134,7 +134,7 @@ void PmrWebServiceManager::openBrowser(const QUrl &pUrl) connect(mWebViewerDialog, &Core::Dialog::rejected, this, &PmrWebServiceManager::authenticationCancelled); } else { - mWebViewerDialog->load(QString()); + mWebViewerDialog->load({}); // Note: this is in case we used our Web brower before, in which case it // will contain something, which we don't want to see when // reopening it... diff --git a/src/plugins/support/PMRSupport/src/pmrwebviewerdialog.cpp b/src/plugins/support/PMRSupport/src/pmrwebviewerdialog.cpp index a1b00a195f..13d6b09f40 100644 --- a/src/plugins/support/PMRSupport/src/pmrwebviewerdialog.cpp +++ b/src/plugins/support/PMRSupport/src/pmrwebviewerdialog.cpp @@ -53,7 +53,7 @@ PmrWebViewerDialog::PmrWebViewerDialog(QWidget *pParent) : auto layout = new QVBoxLayout(this); - layout->setContentsMargins(QMargins()); + layout->setContentsMargins({}); setLayout(layout); diff --git a/src/plugins/support/PMRSupport/src/pmrworkspace.cpp b/src/plugins/support/PMRSupport/src/pmrworkspace.cpp index 17190610e0..f18b770c7c 100644 --- a/src/plugins/support/PMRSupport/src/pmrworkspace.cpp +++ b/src/plugins/support/PMRSupport/src/pmrworkspace.cpp @@ -116,7 +116,7 @@ PmrWorkspace::PmrWorkspace(bool pOwned, const QString &pName, PmrWorkspace::PmrWorkspace(bool pOwned, const QString &pName, const QString &pUrl, PmrWebService *pParent) : - PmrWorkspace(pOwned, pName, pUrl, QString(), QString(), pParent) + PmrWorkspace(pOwned, pName, pUrl, {}, {}, pParent) { } @@ -284,7 +284,7 @@ void PmrWorkspace::close() mPath = QString(); - mRootFileNode->setPath(QString()); + mRootFileNode->setPath({}); git_repository_free(mGitRepository); diff --git a/src/plugins/support/PMRSupport/src/pmrworkspacefilenode.cpp b/src/plugins/support/PMRSupport/src/pmrworkspacefilenode.cpp index 1d2dd47309..52b3b9923c 100644 --- a/src/plugins/support/PMRSupport/src/pmrworkspacefilenode.cpp +++ b/src/plugins/support/PMRSupport/src/pmrworkspacefilenode.cpp @@ -45,7 +45,7 @@ PmrWorkspaceFileNode::PmrWorkspaceFileNode(const QString &pName, //============================================================================== PmrWorkspaceFileNode::PmrWorkspaceFileNode(PmrWorkspaceFileNode *pParent) : - PmrWorkspaceFileNode(QString(), QString(), CharPair(), pParent) + PmrWorkspaceFileNode({}, {}, {}, pParent) { } diff --git a/src/plugins/support/SEDMLSupport/src/sedmlfile.cpp b/src/plugins/support/SEDMLSupport/src/sedmlfile.cpp index cf5a3fe99a..0209847224 100644 --- a/src/plugins/support/SEDMLSupport/src/sedmlfile.cpp +++ b/src/plugins/support/SEDMLSupport/src/sedmlfile.cpp @@ -77,7 +77,7 @@ SedmlFile::SedmlFile(const QString &pFileName, const QString &pOwnerFileName, //============================================================================== SedmlFile::SedmlFile(const QString &pFileName, bool pNew) : - SedmlFile(pFileName, QString(), pNew) + SedmlFile(pFileName, {}, pNew) { } @@ -345,7 +345,7 @@ bool SedmlFile::isValid() { // Return whether we are valid - return isValid(QString(), mIssues); + return isValid({}, mIssues); } //============================================================================== diff --git a/src/plugins/support/SEDMLSupport/src/sedmlsupportplugin.cpp b/src/plugins/support/SEDMLSupport/src/sedmlsupportplugin.cpp index 1189ffc747..a91e3d16ef 100644 --- a/src/plugins/support/SEDMLSupport/src/sedmlsupportplugin.cpp +++ b/src/plugins/support/SEDMLSupport/src/sedmlsupportplugin.cpp @@ -252,7 +252,7 @@ void SEDMLSupportPlugin::newSedmlFile() #ifdef QT_DEBUG Core::FileManager::Status createStatus = #endif - fileManagerInstance->create(QString(), + fileManagerInstance->create({}, QString( "\n" R"()""\n" " \n" diff --git a/src/plugins/thirdParty/CellMLAPI/src/cellmlapiplugin.cpp b/src/plugins/thirdParty/CellMLAPI/src/cellmlapiplugin.cpp index 7654dc30a4..9f5d25fcc1 100644 --- a/src/plugins/thirdParty/CellMLAPI/src/cellmlapiplugin.cpp +++ b/src/plugins/thirdParty/CellMLAPI/src/cellmlapiplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC CellMLAPIPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension pour accéder l'API CellML.)")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/thirdParty/LLVMClang/src/llvmclangplugin.cpp b/src/plugins/thirdParty/LLVMClang/src/llvmclangplugin.cpp index 6d63c14b73..167bf630f0 100644 --- a/src/plugins/thirdParty/LLVMClang/src/llvmclangplugin.cpp +++ b/src/plugins/thirdParty/LLVMClang/src/llvmclangplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC LLVMClangPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension pour accéder LLVM et Clang.)")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/thirdParty/LibXDiff/src/libxdiffplugin.cpp b/src/plugins/thirdParty/LibXDiff/src/libxdiffplugin.cpp index 4811471bf6..ee57b7ce10 100644 --- a/src/plugins/thirdParty/LibXDiff/src/libxdiffplugin.cpp +++ b/src/plugins/thirdParty/LibXDiff/src/libxdiffplugin.cpp @@ -42,7 +42,7 @@ PLUGININFO_FUNC LibXDiffPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension pour accéder LibXDiff.)")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/thirdParty/OAuth/src/oauthplugin.cpp b/src/plugins/thirdParty/OAuth/src/oauthplugin.cpp index 0a7db7f2db..141559f444 100644 --- a/src/plugins/thirdParty/OAuth/src/oauthplugin.cpp +++ b/src/plugins/thirdParty/OAuth/src/oauthplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC OAuthPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension pour accéder OAuth for Qt.)")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/thirdParty/OpenSSL/src/opensslplugin.cpp b/src/plugins/thirdParty/OpenSSL/src/opensslplugin.cpp index 4b86bb51f8..f5c827e3bc 100644 --- a/src/plugins/thirdParty/OpenSSL/src/opensslplugin.cpp +++ b/src/plugins/thirdParty/OpenSSL/src/opensslplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC OpenSSLPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension pour accéder OpenSSL.)")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/thirdParty/Python/src/pythonplugin.cpp b/src/plugins/thirdParty/Python/src/pythonplugin.cpp index 46b78c94d1..0b0693612c 100644 --- a/src/plugins/thirdParty/Python/src/pythonplugin.cpp +++ b/src/plugins/thirdParty/Python/src/pythonplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC PythonPluginInfo() descriptions.insert("fr", QString::fromUtf8("une extension pour accéder à Python.")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/thirdParty/QScintilla/src/qscintillaplugin.cpp b/src/plugins/thirdParty/QScintilla/src/qscintillaplugin.cpp index 4fca5f3274..65338156ab 100644 --- a/src/plugins/thirdParty/QScintilla/src/qscintillaplugin.cpp +++ b/src/plugins/thirdParty/QScintilla/src/qscintillaplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC QScintillaPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension pour accéder QScintilla.)")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/thirdParty/Qwt/src/qwtplugin.cpp b/src/plugins/thirdParty/Qwt/src/qwtplugin.cpp index dc6b6c166d..e486c05728 100644 --- a/src/plugins/thirdParty/Qwt/src/qwtplugin.cpp +++ b/src/plugins/thirdParty/Qwt/src/qwtplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC QwtPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension pour accéder Qwt.)")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/thirdParty/SUNDIALS/src/sundialsplugin.cpp b/src/plugins/thirdParty/SUNDIALS/src/sundialsplugin.cpp index 1235788317..932dab143f 100644 --- a/src/plugins/thirdParty/SUNDIALS/src/sundialsplugin.cpp +++ b/src/plugins/thirdParty/SUNDIALS/src/sundialsplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC SUNDIALSPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension pour accéder les solveurs ARKode, CVODES, IDAS et KINSOL de SUNDIALS.)")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/thirdParty/Zinc/src/zincplugin.cpp b/src/plugins/thirdParty/Zinc/src/zincplugin.cpp index 0d6393d3cb..893a7f9531 100644 --- a/src/plugins/thirdParty/Zinc/src/zincplugin.cpp +++ b/src/plugins/thirdParty/Zinc/src/zincplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC ZincPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension pour accéder la librairie Zinc.)")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/thirdParty/libBioSignalML/src/libbiosignalmlplugin.cpp b/src/plugins/thirdParty/libBioSignalML/src/libbiosignalmlplugin.cpp index 14c8ab56b9..3a7369d647 100644 --- a/src/plugins/thirdParty/libBioSignalML/src/libbiosignalmlplugin.cpp +++ b/src/plugins/thirdParty/libBioSignalML/src/libbiosignalmlplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC libBioSignalMLPluginInfo() descriptions.insert("fr", QString::fromUtf8("une extension pour accéder BioSignalML.")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/thirdParty/libSBML/src/libsbmlplugin.cpp b/src/plugins/thirdParty/libSBML/src/libsbmlplugin.cpp index 2759f9f2a4..cedf03b23d 100644 --- a/src/plugins/thirdParty/libSBML/src/libsbmlplugin.cpp +++ b/src/plugins/thirdParty/libSBML/src/libsbmlplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC libSBMLPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension pour accéder libSBML.)")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/thirdParty/zlib/src/zlibplugin.cpp b/src/plugins/thirdParty/zlib/src/zlibplugin.cpp index 5969abe2bf..ef0ad6e9af 100644 --- a/src/plugins/thirdParty/zlib/src/zlibplugin.cpp +++ b/src/plugins/thirdParty/zlib/src/zlibplugin.cpp @@ -38,7 +38,7 @@ PLUGININFO_FUNC zlibPluginInfo() descriptions.insert("fr", QString::fromUtf8(R"(une extension pour accéder zlib.)")); return new PluginInfo(PluginInfo::Category::ThirdParty, false, false, - QStringList(), + {}, descriptions); } diff --git a/src/plugins/tools/CellMLTools/src/cellmltoolsplugin.cpp b/src/plugins/tools/CellMLTools/src/cellmltoolsplugin.cpp index c20d0fbff5..ceebdc35d1 100644 --- a/src/plugins/tools/CellMLTools/src/cellmltoolsplugin.cpp +++ b/src/plugins/tools/CellMLTools/src/cellmltoolsplugin.cpp @@ -420,8 +420,8 @@ bool CellMLToolsPlugin::runCommand(Command pCommand, // Everything seems to be fine, so attempt the // export itself - if ( (isFileName && !cellmlFile->exportTo(QString(), formatOrFileName)) - || (isCellml10Format && !cellmlFile->exportTo(QString(), CellMLSupport::CellmlFile::Version::Cellml_1_0))) { + if ( (isFileName && !cellmlFile->exportTo({}, formatOrFileName)) + || (isCellml10Format && !cellmlFile->exportTo({}, CellMLSupport::CellmlFile::Version::Cellml_1_0))) { output = "The file could not be exported"; if (!cellmlFile->issues().isEmpty()) { diff --git a/src/plugins/widget/EditorWidget/src/editorwidget.cpp b/src/plugins/widget/EditorWidget/src/editorwidget.cpp index f97eb06caa..615890d8f4 100644 --- a/src/plugins/widget/EditorWidget/src/editorwidget.cpp +++ b/src/plugins/widget/EditorWidget/src/editorwidget.cpp @@ -48,7 +48,7 @@ EditorWidget::EditorWidget(const QString &pContents, bool pReadOnly, auto layout = new QVBoxLayout(this); - layout->setContentsMargins(QMargins()); + layout->setContentsMargins({}); layout->setSpacing(0); setLayout(layout); diff --git a/src/plugins/widget/GraphPanelWidget/src/graphpanelwidget.cpp b/src/plugins/widget/GraphPanelWidget/src/graphpanelwidget.cpp index 99bb775e47..d8237f8b65 100644 --- a/src/plugins/widget/GraphPanelWidget/src/graphpanelwidget.cpp +++ b/src/plugins/widget/GraphPanelWidget/src/graphpanelwidget.cpp @@ -84,7 +84,7 @@ GraphPanelWidget::GraphPanelWidget(const GraphPanelWidgets &pNeighbors, auto layout = new QHBoxLayout(this); - layout->setContentsMargins(QMargins()); + layout->setContentsMargins({}); layout->setSpacing(0); setLayout(layout); diff --git a/src/plugins/widget/MathMLViewerWidget/src/mathmlviewerwidget.cpp b/src/plugins/widget/MathMLViewerWidget/src/mathmlviewerwidget.cpp index 188c3ddcfc..5ab92dd930 100644 --- a/src/plugins/widget/MathMLViewerWidget/src/mathmlviewerwidget.cpp +++ b/src/plugins/widget/MathMLViewerWidget/src/mathmlviewerwidget.cpp @@ -256,7 +256,7 @@ void MathmlViewerWidget::setContents(const QString &pContents) if (domDocument.setContent(pContents)) { mError = !mMathmlDocument.setContent(domDocument.toString(-1)); } else if (pContents.isEmpty()) { - mError = !mMathmlDocument.setContent(QString()); + mError = !mMathmlDocument.setContent({}); } else { mError = true; } @@ -735,7 +735,7 @@ void MathmlViewerWidget::copyToClipboard() int contentsHeight = qCeil(mathmlDocumentSize.height()); QPixmap pixmap(contentsWidth, contentsHeight); - render(&pixmap, QPoint(), QRegion(0, 0, contentsWidth, contentsHeight)); + render(&pixmap, {}, QRegion(0, 0, contentsWidth, contentsHeight)); QApplication::clipboard()->setPixmap(pixmap); } diff --git a/src/plugins/widget/WebViewerWidget/src/webviewerwidget.cpp b/src/plugins/widget/WebViewerWidget/src/webviewerwidget.cpp index 73cd56a2ba..f360c0d5a9 100644 --- a/src/plugins/widget/WebViewerWidget/src/webviewerwidget.cpp +++ b/src/plugins/widget/WebViewerWidget/src/webviewerwidget.cpp @@ -182,7 +182,7 @@ WebViewerWidget::WebViewerWidget(QWidget *pParent) : auto layout = new QVBoxLayout(this); - layout->setContentsMargins(QMargins()); + layout->setContentsMargins({}); layout->setSpacing(0); layout->addWidget(mWebView); diff --git a/src/pluginsdialog.cpp b/src/pluginsdialog.cpp index af2dbded49..10590ced34 100644 --- a/src/pluginsdialog.cpp +++ b/src/pluginsdialog.cpp @@ -658,7 +658,7 @@ void PluginsDialog::selectablePluginsCheckBoxToggled(bool pChecked) } } - mGui->treeView->setCurrentIndex(QModelIndex()); + mGui->treeView->setCurrentIndex({}); } //============================================================================== diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp index 2e66902bcf..1f2d2bc7d8 100644 --- a/src/preferencesdialog.cpp +++ b/src/preferencesdialog.cpp @@ -358,7 +358,7 @@ void PreferencesDialog::updatePreferencesWidget(const QModelIndex &pNewIndex, QLayout *widgetLayout = mGui->stackedWidget->currentWidget()->layout(); if (widgetLayout != nullptr) { - widgetLayout->setContentsMargins(QMargins()); + widgetLayout->setContentsMargins({}); } // Make sure that we are big enough to show our contents diff --git a/src/tests/src/main.cpp b/src/tests/src/main.cpp index 108baaf4df..56bef337ee 100644 --- a/src/tests/src/main.cpp +++ b/src/tests/src/main.cpp @@ -119,9 +119,9 @@ int main(int pArgC, char *pArgV[]) // Execute the test itself #if defined(Q_OS_WIN) || defined(Q_OS_LINUX) - int testRes = QProcess::execute(buildDir+"/bin/"+testsGroup.key()+"_"+testName, QStringList()); + int testRes = QProcess::execute(buildDir+"/bin/"+testsGroup.key()+"_"+testName, {}); #else - int testRes = QProcess::execute(buildDir+"/OpenCOR.app/Contents/MacOS/"+testsGroup.key()+"_"+testName, QStringList()); + int testRes = QProcess::execute(buildDir+"/OpenCOR.app/Contents/MacOS/"+testsGroup.key()+"_"+testName, {}); #endif if (testRes != 0) {