diff --git a/wpa_supplicant/wpa_gui-qt4/main.cpp b/wpa_supplicant/wpa_gui-qt4/main.cpp index 9585e1ef0..c5e285ffa 100644 --- a/wpa_supplicant/wpa_gui-qt4/main.cpp +++ b/wpa_supplicant/wpa_gui-qt4/main.cpp @@ -24,7 +24,9 @@ class WpaGuiApp : public QApplication public: WpaGuiApp(int &argc, char **argv); +#ifndef QT_NO_SESSIONMANAGER virtual void saveState(QSessionManager &manager); +#endif WpaGui *w; }; @@ -33,11 +35,13 @@ WpaGuiApp::WpaGuiApp(int &argc, char **argv) : QApplication(argc, argv) { } +#ifndef QT_NO_SESSIONMANAGER void WpaGuiApp::saveState(QSessionManager &manager) { QApplication::saveState(manager); w->saveState(); } +#endif int main(int argc, char *argv[]) diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp index 9f35795bb..c0c207ca6 100644 --- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp +++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp @@ -147,6 +147,7 @@ WpaGui::WpaGui(QApplication *_app, QWidget *parent, const char *, Qt::WFlags) parse_argv(); +#ifndef QT_NO_SESSIONMANAGER if (app->isSessionRestored()) { QSettings settings("wpa_supplicant", "wpa_gui"); settings.beginGroup("state"); @@ -155,6 +156,7 @@ WpaGui::WpaGui(QApplication *_app, QWidget *parent, const char *, Qt::WFlags) startInTray = settings.value("in_tray").toBool(); settings.endGroup(); } +#endif if (QSystemTrayIcon::isSystemTrayAvailable()) createTrayIcon(startInTray); @@ -1721,6 +1723,7 @@ void WpaGui::addInterface() } +#ifndef QT_NO_SESSIONMANAGER void WpaGui::saveState() { QSettings settings("wpa_supplicant", "wpa_gui"); @@ -1729,3 +1732,4 @@ void WpaGui::saveState() settings.setValue("in_tray", inTray); settings.endGroup(); } +#endif diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.h b/wpa_supplicant/wpa_gui-qt4/wpagui.h index 4b206c643..a9b8cd3ee 100644 --- a/wpa_supplicant/wpa_gui-qt4/wpagui.h +++ b/wpa_supplicant/wpa_gui-qt4/wpagui.h @@ -40,7 +40,9 @@ public: virtual void disableNetwork(const QString &sel); virtual int getNetworkDisabled(const QString &sel); void setBssFromScan(const QString &bssid); +#ifndef QT_NO_SESSIONMANAGER void saveState(); +#endif public slots: virtual void parse_argv();