mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
parent
c920688437
commit
908a058a3a
@ -59,7 +59,6 @@
|
||||
#endif
|
||||
#include <QStatusBar>
|
||||
#include <QStringList>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QTcpSocket>
|
||||
#include <QTextStream>
|
||||
#include <QtGlobal>
|
||||
@ -1362,13 +1361,6 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
|
||||
QgsGui::instance()->nativePlatformInterface()->setApplicationBadgeCount( count );
|
||||
} );
|
||||
|
||||
if ( !( QgsGui::nativePlatformInterface()->capabilities() & QgsNative::NativeDesktopNotifications ) )
|
||||
{
|
||||
mTray = new QSystemTrayIcon();
|
||||
mTray->setIcon( QIcon( QgsApplication::appIconPath() ) );
|
||||
mTray->hide();
|
||||
}
|
||||
|
||||
// supposedly all actions have been added, now register them to the shortcut manager
|
||||
QgsGui::shortcutsManager()->registerAllChildren( this );
|
||||
QgsGui::shortcutsManager()->registerAllChildren( mSnappingWidget );
|
||||
@ -1556,7 +1548,6 @@ QgisApp::~QgisApp()
|
||||
delete mPythonUtils;
|
||||
#endif
|
||||
|
||||
delete mTray;
|
||||
delete mDataSourceManagerDialog;
|
||||
qDeleteAll( mCustomDropHandlers );
|
||||
qDeleteAll( mCustomLayoutDropHandlers );
|
||||
@ -13989,15 +13980,8 @@ void QgisApp::showSystemNotification( const QString &title, const QString &messa
|
||||
|
||||
if ( !result.successful )
|
||||
{
|
||||
// fallback - use system tray notification
|
||||
if ( mTray )
|
||||
{
|
||||
// Menubar icon is hidden by default. Show to enable notification bubbles
|
||||
mTray->show();
|
||||
mTray->showMessage( title, message );
|
||||
// Re-hide menubar icon
|
||||
mTray->hide();
|
||||
}
|
||||
// fallback - use message bar
|
||||
messageBar()->pushInfo( title, message );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -36,7 +36,6 @@ class QStringList;
|
||||
class QToolButton;
|
||||
class QTcpSocket;
|
||||
class QValidator;
|
||||
class QSystemTrayIcon;
|
||||
|
||||
class QgisAppInterface;
|
||||
class QgisAppStyleSheet;
|
||||
@ -2267,8 +2266,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
|
||||
bool gestureEvent( QGestureEvent *event );
|
||||
void tapAndHoldTriggered( QTapAndHoldGesture *gesture );
|
||||
|
||||
QSystemTrayIcon *mTray = nullptr;
|
||||
|
||||
QgsLocatorWidget *mLocatorWidget = nullptr;
|
||||
|
||||
QgsStatusBar *mStatusBar = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user