diff --git a/ApplicationLibCode/Application/RiaGuiApplication.cpp b/ApplicationLibCode/Application/RiaGuiApplication.cpp index 1b2a34efc9..6156fd2cf7 100644 --- a/ApplicationLibCode/Application/RiaGuiApplication.cpp +++ b/ApplicationLibCode/Application/RiaGuiApplication.cpp @@ -512,7 +512,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( gsl::not_n { CVF_ASSERT( o.valueCount() == 1 ); QString regressionTestPath = cvfqt::Utils::toQString( o.value( 0 ) ); - RiaRegressionTestRunner::instance()->updateRegressionTest( regressionTestPath ); + RiaRegressionTestRunner::updateRegressionTest( regressionTestPath ); return ApplicationStatus::EXIT_COMPLETED; } @@ -1544,7 +1544,7 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences* //-------------------------------------------------------------------------------------------------- int RiaGuiApplication::applicationResolution() { - return RiaGuiApplication::instance()->desktop()->logicalDpiX(); + return QApplication::desktop()->logicalDpiX(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Application/RiaPreferences.cpp b/ApplicationLibCode/Application/RiaPreferences.cpp index 3351ba7efd..d1e99b9b80 100644 --- a/ApplicationLibCode/Application/RiaPreferences.cpp +++ b/ApplicationLibCode/Application/RiaPreferences.cpp @@ -309,7 +309,7 @@ void RiaPreferences::defineEditorAttribute( const caf::PdmFieldHandle* field, QS caf::PdmUiLineEditorAttribute* myAttr = dynamic_cast( attribute ); if ( myAttr ) { - myAttr->validator = new RiaValidRegExpValidator( RiaPreferences::current()->defaultMultiLateralWellNamePattern() ); + myAttr->validator = new RiaValidRegExpValidator( RiaPreferences::defaultMultiLateralWellNamePattern() ); } } else if ( field == &m_defaultScaleFactorZ ) diff --git a/ApplicationLibCode/Application/RiaPreferencesSummary.cpp b/ApplicationLibCode/Application/RiaPreferencesSummary.cpp index 9dde469913..fffa156995 100644 --- a/ApplicationLibCode/Application/RiaPreferencesSummary.cpp +++ b/ApplicationLibCode/Application/RiaPreferencesSummary.cpp @@ -387,7 +387,7 @@ void RiaPreferencesSummary::defineUiOrdering( QString uiConfigName, caf::PdmUiOr if ( m_summaryReader == SummaryReaderMode::OPM_COMMON ) { - if ( RiaApplication::instance()->enableDevelopmentFeatures() ) + if ( RiaApplication::enableDevelopmentFeatures() ) { uiOrdering.add( &m_useEnhancedSummaryDataFile ); } @@ -397,7 +397,7 @@ void RiaPreferencesSummary::defineUiOrdering( QString uiConfigName, caf::PdmUiOr { uiOrdering.add( &m_createH5SummaryDataFile ); - if ( RiaApplication::instance()->enableDevelopmentFeatures() ) + if ( RiaApplication::enableDevelopmentFeatures() ) { uiOrdering.add( &m_createH5SummaryFileThreadCount ); } diff --git a/ApplicationLibCode/Application/Tools/RiaFieldHandleTools.cpp b/ApplicationLibCode/Application/Tools/RiaFieldHandleTools.cpp index ceca591a3b..e0a08bcb58 100644 --- a/ApplicationLibCode/Application/Tools/RiaFieldHandleTools.cpp +++ b/ApplicationLibCode/Application/Tools/RiaFieldHandleTools.cpp @@ -54,7 +54,7 @@ void RiaFieldHandleTools::disableWriteAndSetFieldHidden( caf::PdmFieldHandle* fi void RiaFieldHandleTools::updateOverrideStateAndLabel( caf::PdmFieldHandle* fieldHandle, bool isOverridden, const QString& toolTip ) { // Get the label text as given by the init_field macro - QString labelText = fieldHandle->uiCapability()->uiName( fieldHandle->uiCapability()->uiConfigNameForStaticData() ); + QString labelText = fieldHandle->uiCapability()->uiName( caf::PdmUiItem::uiConfigNameForStaticData() ); if ( isOverridden ) labelText += " (overridden)"; fieldHandle->uiCapability()->setUiToolTip( toolTip ); diff --git a/ApplicationLibCode/CommandFileInterface/RicfExportSnapshots.cpp b/ApplicationLibCode/CommandFileInterface/RicfExportSnapshots.cpp index e52e6b634b..9e63b57071 100644 --- a/ApplicationLibCode/CommandFileInterface/RicfExportSnapshots.cpp +++ b/ApplicationLibCode/CommandFileInterface/RicfExportSnapshots.cpp @@ -89,7 +89,7 @@ caf::PdmScriptResponse RicfExportSnapshots::execute() QByteArray curState = mainWnd->dockManager()->saveState( 0 ); mainWnd->dockManager()->restoreState( RiuDockWidgetTools::defaultDockState( RiuDockWidgetTools::dockStateHideAll3DWindowName() ) ); - RiaGuiApplication::instance()->processEvents(); + QApplication::processEvents(); QString absolutePathToSnapshotDir = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::SNAPSHOTS ); @@ -131,7 +131,7 @@ caf::PdmScriptResponse RicfExportSnapshots::execute() RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( absolutePathToSnapshotDir, activateWidget, m_prefix, m_viewId(), fileSuffix ); } - RiaGuiApplication::instance()->processEvents(); + QApplication::processEvents(); mainWnd->dockManager()->restoreState( curState ); diff --git a/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.cpp b/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.cpp index 826f3a0e20..8f84bf3ea0 100644 --- a/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.cpp +++ b/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.cpp @@ -859,7 +859,7 @@ void RicRecursiveFileSearchDialog::slotCopyFileItemText() if ( m_fileListWidget->currentItem() ) { QString relativePathText = m_fileListWidget->currentItem()->text(); - RiaGuiApplication::instance()->clipboard()->setText( relativePathText ); + QApplication::clipboard()->setText( relativePathText ); } } diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicCreateWellTargetsPickEventHandler.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicCreateWellTargetsPickEventHandler.cpp index 4f76b986e0..1c60cf8a69 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicCreateWellTargetsPickEventHandler.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicCreateWellTargetsPickEventHandler.cpp @@ -73,7 +73,7 @@ RicCreateWellTargetsPickEventHandler::~RicCreateWellTargetsPickEventHandler() //-------------------------------------------------------------------------------------------------- void RicCreateWellTargetsPickEventHandler::registerAsPickEventHandler() { - RiaGuiApplication::instance()->setOverrideCursor( Qt::CrossCursor ); + QApplication::setOverrideCursor( Qt::CrossCursor ); Ric3dViewPickEventHandler::registerAsPickEventHandler(); } @@ -82,7 +82,7 @@ void RicCreateWellTargetsPickEventHandler::registerAsPickEventHandler() //-------------------------------------------------------------------------------------------------- void RicCreateWellTargetsPickEventHandler::notifyUnregistered() { - RiaGuiApplication::instance()->restoreOverrideCursor(); + QApplication::restoreOverrideCursor(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp index b827e38c82..0ed1b8f990 100644 --- a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp +++ b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp @@ -603,7 +603,7 @@ void RimGeoMechView::updateTensorLegendTextAndRanges( RimRegularLegendConfig* le RigGeoMechCaseData* gmCase = m_geomechCase->geoMechData(); CVF_ASSERT( gmCase ); - RigFemResultPosEnum resPos = tensorResults()->resultPositionType(); + RigFemResultPosEnum resPos = RimTensorResults::resultPositionType(); QString resFieldName = tensorResults()->resultFieldName(); RigFemResultAddress resVarAddress( resPos, resFieldName.toStdString(), "" ); diff --git a/ApplicationLibCode/UserInterface/RiuGuiTheme.cpp b/ApplicationLibCode/UserInterface/RiuGuiTheme.cpp index 2a40fd952f..4f7fb46b2c 100644 --- a/ApplicationLibCode/UserInterface/RiuGuiTheme.cpp +++ b/ApplicationLibCode/UserInterface/RiuGuiTheme.cpp @@ -79,7 +79,7 @@ QMap RiuGuiTheme: } if ( lineColor.isEmpty() && symbolColor.isEmpty() ) return; - const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets(); + const QWidgetList topLevelWidgets = QApplication::topLevelWidgets(); for ( QWidget* widget : topLevelWidgets ) { for ( QwtPlot* plotWidget : widget->findChildren() ) @@ -121,7 +121,7 @@ QMap RiuGuiTheme: QRegExp itemNameRegExp( match.captured( "itemName" ) ); QRegularExpression colorRegExp( "color:\\s*([#0-9a-zA-Z]+)" ); QString color = colorRegExp.match( match.captured( "properties" ) ).captured( 1 ); - const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets(); + const QWidgetList topLevelWidgets = QApplication::topLevelWidgets(); if ( !color.isEmpty() ) { @@ -159,7 +159,7 @@ QMap RiuGuiTheme: QRegExp itemNameRegExp( match.captured( "itemName" ) ); QRegularExpression colorRegExp( "text-color:\\s*([#0-9a-zA-Z]+)" ); QString color = colorRegExp.match( match.captured( "properties" ) ).captured( 1 ); - const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets(); + const QWidgetList topLevelWidgets = QApplication::topLevelWidgets(); if ( !color.isEmpty() ) { @@ -196,7 +196,7 @@ QMap RiuGuiTheme: QRegularExpression textColorRegExp( "text-color:\\s*([#0-9a-zA-Z]+)" ); QString textColor = textColorRegExp.match( match.captured( "properties" ) ).captured( 1 ); - const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets(); + const QWidgetList topLevelWidgets = QApplication::topLevelWidgets(); if ( !color.isEmpty() ) { @@ -250,7 +250,7 @@ QMap RiuGuiTheme: QRegularExpression textColorRegExp( "text-color:\\s*([#0-9a-zA-Z]+)" ); QString textColor = textColorRegExp.match( match.captured( "properties" ) ).captured( 1 ); - const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets(); + const QWidgetList topLevelWidgets = QApplication::topLevelWidgets(); if ( !color.isEmpty() ) { @@ -304,7 +304,7 @@ QMap RiuGuiTheme: QRegularExpression textColorRegExp( "text-color:\\s*([#a-zA-Z0-9]+)" ); QString textColor = textColorRegExp.match( match.captured( "properties" ) ).captured( 1 ); - const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets(); + const QWidgetList topLevelWidgets = QApplication::topLevelWidgets(); if ( !textColor.isEmpty() ) { @@ -349,7 +349,7 @@ void RiuGuiTheme::updateGuiTheme( RiaDefines::ThemeEnum theme ) s_qwtPlotItemPropertiesMap.clear(); applyStyleSheet( theme ); - const QWidgetList allWidgets = RiaGuiApplication::instance()->allWidgets(); + const QWidgetList allWidgets = QApplication::allWidgets(); for ( QWidget* widget : allWidgets ) { widget->style()->unpolish( widget ); @@ -503,7 +503,7 @@ bool RiuGuiTheme::writeStyleSheetToFile( RiaDefines::ThemeEnum theme, const QStr preparseStyleSheet( theme, modifiedStyleSheet ); RiaGuiApplication* app = RiaGuiApplication::instance(); app->setStyleSheet( modifiedStyleSheet ); - const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->allWidgets(); + const QWidgetList topLevelWidgets = QApplication::allWidgets(); for ( QWidget* widget : topLevelWidgets ) { widget->style()->unpolish( widget ); @@ -768,7 +768,7 @@ void RiuGuiTheme::preparseStyleSheet( RiaDefines::ThemeEnum theme, QString& styl QRegularExpression paletteRegExp( regExp ); QRegularExpressionMatchIterator matchIterator = paletteRegExp.globalMatch( styleSheet ); - QPalette palette = RiaGuiApplication::instance()->palette(); + QPalette palette = QApplication::palette(); while ( matchIterator.hasNext() ) { diff --git a/ApplicationLibCode/UserInterface/RiuViewer.cpp b/ApplicationLibCode/UserInterface/RiuViewer.cpp index 0631d1a31c..4bd9455a06 100644 --- a/ApplicationLibCode/UserInterface/RiuViewer.cpp +++ b/ApplicationLibCode/UserInterface/RiuViewer.cpp @@ -98,7 +98,7 @@ RiuViewer::RiuViewer( const QGLFormat& format, QWidget* parent ) , m_zScale( 1.0 ) { cvf::Font* standardFont = RiaGuiApplication::instance()->defaultSceneFont(); - QFont font = RiaGuiApplication::instance()->font(); + QFont font = QApplication::font(); auto viewFontSize = RiaPreferences::current()->defaultSceneFontSize(); font.setPointSize( caf::FontTools::absolutePointSize( viewFontSize ) );