From c8279e0c4a76db65547e6c711b8e7717e0d28059 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 7 Dec 2008 00:18:36 +0100 Subject: No more QmessageBox here.. --- src/browsermainwindow.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'src/browsermainwindow.cpp') 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 #include #include +#include // Qt Includes #include @@ -49,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -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(); } -- cgit v1.2.1