mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Move icon connection to constructor
This commit is contained in:
parent
79900171f8
commit
89dbd5c71a
@ -41,6 +41,10 @@ QgsMessageLogViewer::QgsMessageLogViewer( QWidget *parent, Qt::WindowFlags fl )
|
||||
|
||||
connect( tabWidget, &QTabWidget::tabCloseRequested, this, &QgsMessageLogViewer::closeTab );
|
||||
|
||||
connect( tabWidget, &QTabWidget::currentChanged, this, [this]( int index ) {
|
||||
tabWidget->setTabIcon( index, QIcon() );
|
||||
} );
|
||||
|
||||
mTabBarContextMenu = new QMenu( this );
|
||||
tabWidget->tabBar()->setContextMenuPolicy( Qt::CustomContextMenu );
|
||||
connect( tabWidget->tabBar(), &QWidget::customContextMenuRequested, this, &QgsMessageLogViewer::showContextMenuForTabBar );
|
||||
@ -131,9 +135,6 @@ void QgsMessageLogViewer::logMessage( const QString &message, const QString &tag
|
||||
w->setReadOnly( true );
|
||||
w->viewport()->installEventFilter( this );
|
||||
i = tabWidget->addTab( w, QgsApplication::getThemeIcon( QStringLiteral( "mMessageLog.svg" ) ), cleanedTag );
|
||||
connect( tabWidget, &QTabWidget::currentChanged, this, [this]( int index ) {
|
||||
tabWidget->setTabIcon( index, QIcon() );
|
||||
} );
|
||||
}
|
||||
|
||||
QString levelString;
|
||||
|
Loading…
x
Reference in New Issue
Block a user