aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-08-31 23:13:43 +0000
committerGerald Combs <gerald@wireshark.org>2012-08-31 23:13:43 +0000
commitcf4ac2931e668bc2c554cee182312dc534f1efe2 (patch)
treece3ff833fcf3be9175d20927e4fe073f3eb9be07 /ui
parentd6ce6168bb85fc0fe41e6013bce6905bb1c583b3 (diff)
Fix compilation on Windows.
The moc man page says "The moc does not expand #include or #define, it simply skips any preprocessor directives it encounters." This means our signals and slots have to exist everywhere, even if they're empty on some platforms. Remove some duplicate definitions. svn path=/trunk/; revision=44716
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/capture_interface_dialog.cpp2
-rw-r--r--ui/qt/main_window.cpp17
-rw-r--r--ui/qt/main_window.h3
-rw-r--r--ui/qt/qt_ui_utils.h20
4 files changed, 21 insertions, 21 deletions
diff --git a/ui/qt/capture_interface_dialog.cpp b/ui/qt/capture_interface_dialog.cpp
index bbffdf2e46..10ff3ec548 100644
--- a/ui/qt/capture_interface_dialog.cpp
+++ b/ui/qt/capture_interface_dialog.cpp
@@ -30,6 +30,8 @@
#include "ui/recent.h"
#include "ui/recent_utils.h"
+#include "capture_opts.h"
+
#include <epan/prefs.h>
#include <QHash>
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index 55741f59d5..5d70620b3c 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -239,12 +239,12 @@ void MainWindow::setPipeInputHandler(gint source, gpointer user_data, int *child
/*g_log(NULL, G_LOG_LEVEL_DEBUG, "pipe_input_set_handler: new");*/
if (pipe_timer_) {
- disconnect(pipe_timer_, SIGNAL(timeout)), this, SLOT(pipeTimeout)));
+ disconnect(pipe_timer_, SIGNAL(timeout), this, SLOT(pipeTimeout));
delete pipe_timer_;
}
pipe_timer_ = new QTimer(this);
- connect(pipe_timer_, SIGNAL(timeout)), this, SLOT(pipeTimeout)));
+ connect(pipe_timer_, SIGNAL(timeout), this, SLOT(pipeTimeout));
pipe_timer_->start(200);
#else
if (pipe_notifier_) {
@@ -849,13 +849,12 @@ void MainWindow::startCapture() {
}
// Copied from ui/gtk/gui_utils.c
-#ifdef _WIN32
void MainWindow::pipeTimeout() {
+#ifdef _WIN32
HANDLE handle;
DWORD avail = 0;
gboolean result, result1;
DWORD childstatus;
- pipe_input_t *pipe_input = data;
gint iterations = 0;
@@ -884,7 +883,6 @@ void MainWindow::pipeTimeout() {
if (!pipe_input_cb_(pipe_source_, pipe_user_data_)) {
g_log(NULL, G_LOG_LEVEL_DEBUG, "pipe_timer_cb: input pipe closed, iterations: %u", iterations);
/* pipe closed, return false so that the old timer is not run again */
- return FALSE;
}
}
else {
@@ -895,9 +893,11 @@ void MainWindow::pipeTimeout() {
iterations++;
}
+#endif // _WIN32
}
-#else
+
void MainWindow::pipeActivated(int source) {
+#ifndef _WIN32
g_assert(source == pipe_source_);
pipe_notifier_->setEnabled(false);
@@ -906,14 +906,15 @@ void MainWindow::pipeActivated(int source) {
} else {
delete pipe_notifier_;
}
+#endif // _WIN32
}
void MainWindow::pipeNotifierDestroyed() {
+#ifndef _WIN32
pipe_notifier_ = NULL;
+#endif // _WIN32
}
-#endif
-
void MainWindow::stopCapture() {
//#ifdef HAVE_AIRPCAP
// if (airpcap_if_active)
diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h
index 6d52ff4a13..f007b3d5f3 100644
--- a/ui/qt/main_window.h
+++ b/ui/qt/main_window.h
@@ -128,12 +128,9 @@ public slots:
private slots:
void startCapture();
-#ifdef _WIN32
void pipeTimeout();
-#else
void pipeActivated(int source);
void pipeNotifierDestroyed();
-#endif
void stopCapture();
void updateRecentFiles();
diff --git a/ui/qt/qt_ui_utils.h b/ui/qt/qt_ui_utils.h
index 6b85529b41..ad3fb4261f 100644
--- a/ui/qt/qt_ui_utils.h
+++ b/ui/qt/qt_ui_utils.h
@@ -42,17 +42,17 @@ extern "C" {
#define RECENT_KEY_CAPTURE_FILE "recent.capture_file"
#define RECENT_KEY_REMOTE_HOST "recent.remote_host"
-/* Type of capture source */
-typedef enum {
- CAPTURE_IFLOCAL, /**< Local network interface */
- CAPTURE_IFREMOTE /**< Remote network interface */
-} capture_source;
+///* Type of capture source */
+//typedef enum {
+// CAPTURE_IFLOCAL, /**< Local network interface */
+// CAPTURE_IFREMOTE /**< Remote network interface */
+//} capture_source;
-/* Type of RPCAPD Authentication */
-typedef enum {
- CAPTURE_AUTH_NULL, /**< No authentication */
- CAPTURE_AUTH_PWD /**< User/password authentication */
-} capture_auth;
+///* Type of RPCAPD Authentication */
+//typedef enum {
+// CAPTURE_AUTH_NULL, /**< No authentication */
+// CAPTURE_AUTH_PWD /**< User/password authentication */
+//} capture_auth;
struct remote_host_t {
gchar *remote_host; /**< Host name or network address for remote capturing */