mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Update clang-tidy.yml
* Make sure clang-tidy action use .clang-tidy config file Use add-paths to instruct create-pull-request to a sub folder to avoid diff from Qt and vcpkg * Use empty() in macro to avoid clang-tidy warning * Add NOLINT to CAF_ASSERT * Add NOLINT to cvfAssert
This commit is contained in:
@@ -311,7 +311,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void drawBackbone( QPainter* ) const override {}
|
||||
void drawBackbone( QPainter* ) const override {}
|
||||
|
||||
private:
|
||||
std::map<double, RiuBarChartTick> m_posTickTypeAndTexts;
|
||||
|
||||
@@ -35,7 +35,7 @@ class RiuComparisonViewMover : public QObject
|
||||
public:
|
||||
RiuComparisonViewMover( caf::Viewer* viewer );
|
||||
|
||||
virtual bool eventFilter( QObject* watched, QEvent* event ) override;
|
||||
bool eventFilter( QObject* watched, QEvent* event ) override;
|
||||
|
||||
void paintMoverHandles( QPainter* painter );
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ QMap<QString, CustomStyleSheetApplicator> 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<QwtPlot*>() )
|
||||
@@ -121,7 +121,7 @@ QMap<QString, CustomStyleSheetApplicator> 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<QString, CustomStyleSheetApplicator> 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<QString, CustomStyleSheetApplicator> 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<QString, CustomStyleSheetApplicator> 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<QString, CustomStyleSheetApplicator> 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() )
|
||||
{
|
||||
|
||||
@@ -70,7 +70,7 @@ void RiuMessagePanel::addMessage( RILogLevel messageLevel, const QString& msg )
|
||||
QTextCharFormat form = m_textEdit->currentCharFormat();
|
||||
form.setForeground( clr );
|
||||
form.setFontWeight( messageLevel == RILogLevel::RI_LL_ERROR ? QFont::DemiBold : QFont::Normal );
|
||||
form.setFontItalic( messageLevel == RILogLevel::RI_LL_DEBUG ? true : false );
|
||||
form.setFontItalic( messageLevel == RILogLevel::RI_LL_DEBUG );
|
||||
m_textEdit->setCurrentCharFormat( form );
|
||||
m_textEdit->appendPlainText( msg );
|
||||
|
||||
|
||||
@@ -39,12 +39,12 @@ void RiuTools::enableAllActionsOnShow( QObject* object, QMenu* menu )
|
||||
{
|
||||
if ( object && menu )
|
||||
{
|
||||
object->connect( menu,
|
||||
&QMenu::aboutToShow,
|
||||
[menu]()
|
||||
{
|
||||
for ( auto act : menu->actions() )
|
||||
act->setEnabled( true );
|
||||
} );
|
||||
QObject::connect( menu,
|
||||
&QMenu::aboutToShow,
|
||||
[menu]()
|
||||
{
|
||||
for ( auto act : menu->actions() )
|
||||
act->setEnabled( true );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
Reference in New Issue
Block a user