From b3ced494126802091ac25090a941bae99d8a8d5b Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 26 Sep 2012 21:16:59 +0000 Subject: Fix compilation on Windows. svn path=/trunk/; revision=45160 --- ui/qt/capture_file_dialog.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'ui/qt/capture_file_dialog.cpp') 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; } -- cgit v1.2.3