diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2008-12-07 00:18:36 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2008-12-07 00:18:36 +0100 |
commit | c8279e0c4a76db65547e6c711b8e7717e0d28059 (patch) | |
tree | e9e42a5cca514d600094afe8d4c03af2bd82ce23 /src/browsermainwindow.cpp | |
parent | Fixed crash when closing rekonq with more than one tab (diff) | |
download | rekonq-c8279e0c4a76db65547e6c711b8e7717e0d28059.tar.xz |
No more QmessageBox here..
Diffstat (limited to 'src/browsermainwindow.cpp')
-rw-r--r-- | src/browsermainwindow.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/browsermainwindow.cpp b/src/browsermainwindow.cpp index 4f242225..6ca9c256 100644 --- a/src/browsermainwindow.cpp +++ b/src/browsermainwindow.cpp @@ -41,6 +41,7 @@ #include <KAction> #include <KToggleFullScreenAction> #include <KActionCollection> +#include <KMessageBox> // Qt Includes #include <QDesktopWidget> @@ -49,7 +50,6 @@ #include <QPrintDialog> #include <QPrintPreviewDialog> #include <QPrinter> -#include <QMessageBox> #include <QToolBar> #include <QInputDialog> #include <QWebFrame> @@ -593,10 +593,8 @@ void BrowserMainWindow::slotPrivateBrowsing() " Until you close the window, you can still click the Back and Forward buttons" \ " to return to the webpages you have opened."); - QMessageBox::StandardButton button = QMessageBox::question(this, QString(), text, - QMessageBox::Ok | QMessageBox::Cancel, - QMessageBox::Ok); - if (button == QMessageBox::Ok) + int button = KMessageBox::questionYesNo( this, text, title ); + if (button == KMessageBox::Ok) { settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, true); } @@ -620,12 +618,10 @@ void BrowserMainWindow::closeEvent(QCloseEvent *event) { if (m_tabWidget->count() > 1) { - int ret = QMessageBox::warning(this, QString(), - i18n("Are you sure you want to close the window?" - " There are %1 tab open" , m_tabWidget->count() ) , - QMessageBox::Yes | QMessageBox::No, - QMessageBox::No); - if (ret == QMessageBox::No) + int ret = KMessageBox::warningYesNo(this, + i18n("Are you sure you want to close the window?" " There are %1 tab open" , m_tabWidget->count() ) , + QString() ); + if (ret == KMessageBox::No) { event->ignore(); return; @@ -730,11 +726,11 @@ void BrowserMainWindow::slotToggleInspector(bool enable) QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, enable); if (enable) { - int result = QMessageBox::question(this, i18n("Web Inspector"), + int result = KMessageBox::questionYesNo(this, i18n("The web inspector will only work correctly for pages that were loaded after enabling.\n" "Do you want to reload all pages?"), - QMessageBox::Yes | QMessageBox::No); - if (result == QMessageBox::Yes) + i18n("Web Inspector") ); + if (result == KMessageBox::Yes) { m_tabWidget->reloadAllTabs(); } |