aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/capture_file_dialog.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-09-26 21:16:59 +0000
committerGerald Combs <gerald@wireshark.org>2012-09-26 21:16:59 +0000
commitb3ced494126802091ac25090a941bae99d8a8d5b (patch)
tree7e3bd3f728bb160b8f35fe31beb4a8b5139658ec /ui/qt/capture_file_dialog.cpp
parent9636d1655d0859b530162604c620ac3fcb73d62c (diff)
Fix compilation on Windows.
svn path=/trunk/; revision=45160
Diffstat (limited to 'ui/qt/capture_file_dialog.cpp')
-rw-r--r--ui/qt/capture_file_dialog.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/ui/qt/capture_file_dialog.cpp b/ui/qt/capture_file_dialog.cpp
index d72a358400..fab2557032 100644
--- a/ui/qt/capture_file_dialog.cpp
+++ b/ui/qt/capture_file_dialog.cpp
@@ -148,8 +148,12 @@ CaptureFileDialog::CaptureFileDialog(QWidget *parent, QString &display_filter) :
#endif // Q_WS_WIN
}
-#if !defined(Q_WS_WIN)
-check_savability_t CaptureFileDialog::checkSaveAsWithComments(capture_file *cf, int file_type) {
+check_savability_t CaptureFileDialog::checkSaveAsWithComments(QWidget *parent, capture_file *cf, int file_type) {
+#if defined(Q_WS_WIN)
+ if (!parent || !cf)
+ return CANCELLED;
+ return win32_check_save_as_with_comments(parent->effectiveWinId(), cf, file_type);
+#else // Q_WS_WIN
QMessageBox msg_dialog;
int response;
@@ -228,8 +232,8 @@ check_savability_t CaptureFileDialog::checkSaveAsWithComments(capture_file *cf,
break;
}
return CANCELLED;
-}
#endif // Q_WS_WIN
+}
void CaptureFileDialog::addPreview(QVBoxLayout &v_box) {
QGridLayout *preview_grid = new QGridLayout();
@@ -357,7 +361,7 @@ int CaptureFileDialog::selectedFileType() {
return file_type_;
}
-int CaptureFileDialog::isCompressed() {
+bool CaptureFileDialog::isCompressed() {
return compressed_;
}
@@ -386,7 +390,7 @@ check_savability_t CaptureFileDialog::saveAs(capture_file *cf, QString &file_nam
g_string_free(fname, TRUE);
if (wsf_status) {
- return win32_check_save_as_with_comments(parentWidget()->effectiveWinId(), cf, file_type);
+ return win32_check_save_as_with_comments(parentWidget()->effectiveWinId(), cf, file_type_);
}
return CANCELLED;
@@ -513,7 +517,7 @@ check_savability_t CaptureFileDialog::saveAs(capture_file *cf, QString &file_nam
if (QFileDialog::exec() && selectedFiles().length() > 0) {
file_name = selectedFiles()[0];
- return checkSaveAsWithComments(cf, selectedFileType());
+ return checkSaveAsWithComments(this, cf, selectedFileType());
}
return CANCELLED;
}