summaryrefslogtreecommitdiff
path: root/src/tabwidget.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2008-12-07 00:18:36 +0100
committerAndrea Diamantini <adjam7@gmail.com>2008-12-07 00:18:36 +0100
commitc8279e0c4a76db65547e6c711b8e7717e0d28059 (patch)
treee9e42a5cca514d600094afe8d4c03af2bd82ce23 /src/tabwidget.cpp
parentFixed crash when closing rekonq with more than one tab (diff)
downloadrekonq-c8279e0c4a76db65547e6c711b8e7717e0d28059.tar.xz
No more QmessageBox here..
Diffstat (limited to 'src/tabwidget.cpp')
-rw-r--r--src/tabwidget.cpp18
1 files changed, 8 insertions, 10 deletions
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 <KShortcut>
#include <KStandardShortcut>
+#include <KMessageBox>
// Qt Includes
#include <QtGui>
@@ -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();