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/tabwidget.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/tabwidget.cpp') diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp index b8e9c748..01f9bd6c 100644 --- a/src/tabwidget.cpp +++ b/src/tabwidget.cpp @@ -31,6 +31,7 @@ // KDE Includes #include #include +#include // Qt Includes #include @@ -334,6 +335,7 @@ void TabWidget::currentChanged(int index) if (!webView) return; +// FIXME Q_ASSERT( m_lineEdits->count() == count() ); WebView *oldWebView = this->webView(m_lineEdits->currentIndex()); @@ -601,16 +603,12 @@ void TabWidget::closeTab(int index) { if (tab->isModified()) { - QMessageBox closeConfirmation(tab); - closeConfirmation.setWindowFlags(Qt::Sheet); - closeConfirmation.setWindowTitle(i18n("Do you really want to close this page?")); - closeConfirmation.setInformativeText(i18n("You have modified this page and when closing it you would lose the modification.\n" - "Do you really want to close this page?\n")); - closeConfirmation.setIcon(QMessageBox::Question); - closeConfirmation.addButton(QMessageBox::Yes); - closeConfirmation.addButton(QMessageBox::No); - closeConfirmation.setEscapeButton(QMessageBox::No); - if (closeConfirmation.exec() == QMessageBox::No) + int risp = KMessageBox::questionYesNo( this , + i18n("You have modified this page and when closing it you would lose the modification.\n" + "Do you really want to close this page?\n"), + i18n("Do you really want to close this page?"), + KStandardGuiItem::no() ); + if( risp == KMessageBox::No ) return; } hasFocus = tab->hasFocus(); -- cgit v1.2.1