aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-01-11 12:16:56 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-01-11 12:16:56 +0000
commite2cec3b99025c579c5564688c0fc4ad76a6f7e9d (patch)
tree313109a12dc33a6afd1b98b4ba910b6b2a174590 /ui
parentbf95d60829edd21873e6e2d801a79e580afe06dd (diff)
Remove (ugly) hack in about_dialog.cpp (include main.cpp to have function to set comp_info_str and runtime_info_str variable)
Now About Dialog is start after main() and variables is set by main(), only extern variable in wireshark_applicatin.h svn path=/trunk/; revision=54696
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/about_dialog.cpp13
-rw-r--r--ui/qt/wireshark_application.h5
2 files changed, 5 insertions, 13 deletions
diff --git a/ui/qt/about_dialog.cpp b/ui/qt/about_dialog.cpp
index 96a5fbecf7..76ccddb0d9 100644
--- a/ui/qt/about_dialog.cpp
+++ b/ui/qt/about_dialog.cpp
@@ -27,7 +27,6 @@
#include "ui_about_dialog.h"
#include "wireshark_application.h"
-#include "main.cpp"
#include <wsutil/filesystem.h>
#ifdef HAVE_LIBSMI
@@ -58,7 +57,6 @@
#include <QTextStream>
// To do:
-// - Found better solution to reuse comp_info_str and runtime_info_str (Remove ugly hack...)
// - Tweat and enhance ui...
void AboutDialog::about_folders_row(const char *name, const char *dir, const char *typ_file)
@@ -115,17 +113,6 @@ AboutDialog::AboutDialog(QWidget *parent) :
/* Wireshark tab */
- /* Assemble the compile-time version information string */
- comp_info_str = g_string_new("Compiled ");
-
- // Ugly hack... copy from ui/qt/main.cpp */
- get_compiled_version_info(comp_info_str, get_qt_compiled_info, get_gui_compiled_info);
-
- /* Assemble the run-time version information string */
- runtime_info_str = g_string_new("Running ");
-
- get_runtime_version_info(runtime_info_str, get_gui_runtime_info);
-
/* Construct the message string */
message = g_strdup_printf(
"Version " VERSION "%s\n"
diff --git a/ui/qt/wireshark_application.h b/ui/qt/wireshark_application.h
index ab29035e90..74980bac11 100644
--- a/ui/qt/wireshark_application.h
+++ b/ui/qt/wireshark_application.h
@@ -141,6 +141,11 @@ private slots:
extern WiresharkApplication *wsApp;
+/** Global compile time version string */
+extern GString *comp_info_str;
+/** Global runtime version string */
+extern GString *runtime_info_str;
+
#endif // WIRESHARK_APPLICATION_H
/*