aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Rüb <christian.rueb@gmail.com>2009-11-16 11:20:53 (GMT)
committerJouni Malinen <j@w1.fi>2009-11-22 19:33:25 (GMT)
commitf1a151f38c6a757117cbbb677fc88806507acd63 (patch)
treeb89e9a4986d708f109cb29133c83e0bad960e4d5
parentf2a382c901ac49765a8338da8c22bf26d8e42cfd (diff)
downloadhostap-06-f1a151f38c6a757117cbbb677fc88806507acd63.zip
hostap-06-f1a151f38c6a757117cbbb677fc88806507acd63.tar.gz
hostap-06-f1a151f38c6a757117cbbb677fc88806507acd63.tar.bz2
wpa_gui-qt4: Fix build with Session Manager disabled in Qt4
When trying to build wpa_gui (Qt4 version) from openembedded it fails because Qt4 is compiled without session manager and thus wpa_gui fails to compile. I attached a patch, that enables compiling without Session Manager (via preprocessor) if it is not compiled into Qt4; otherwise, it behaves as it does right now. I checked to build on my host (Debian unstable, Session Manager enabled) and openembedded (Session Manager disabled). (cherry picked from commit 1545457e04cfd625c1c9439e62a6a3b5fb1cf15c)
-rw-r--r--wpa_supplicant/wpa_gui-qt4/main.cpp4
-rw-r--r--wpa_supplicant/wpa_gui-qt4/wpagui.cpp4
-rw-r--r--wpa_supplicant/wpa_gui-qt4/wpagui.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_gui-qt4/main.cpp b/wpa_supplicant/wpa_gui-qt4/main.cpp
index 9585e1e..c5e285f 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 dcd33b9..eb5a76b 100644
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
@@ -145,6 +145,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");
@@ -153,6 +154,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);
@@ -1689,6 +1691,7 @@ void WpaGui::addInterface()
}
+#ifndef QT_NO_SESSIONMANAGER
void WpaGui::saveState()
{
QSettings settings("wpa_supplicant", "wpa_gui");
@@ -1697,3 +1700,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 a533965..741cf17 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();