summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-02-05 00:29:13 +0100
committerAndrea Diamantini <adjam7@gmail.com>2010-02-05 00:29:13 +0100
commitc328e203e0d84177a0028d8ba5b0af4b82c16eeb (patch)
treee6b38cc023c1920a6b2bab87a36ac5932a534ad5 /src/mainwindow.cpp
parentMerge commit 'refs/merge-requests/85' of git://gitorious.org/rekonq/mainline (diff)
downloadrekonq-c328e203e0d84177a0028d8ba5b0af4b82c16eeb.tar.xz
QPointers --> QWeakPointers
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index df600c05..ffc9f508 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -76,7 +76,7 @@
#include <QtCore/QRect>
#include <QtCore/QSize>
#include <QtCore/QList>
-#include <QtCore/QPointer>
+#include <QtCore/QWeakPointer>
#include <QtGui/QWidget>
#include <QtGui/QVBoxLayout>
@@ -599,13 +599,14 @@ void MainWindow::preferences()
return;
// we didn't find an instance of this dialog, so lets create it
- QPointer<SettingsDialog> s = new SettingsDialog(this);
+ QWeakPointer<SettingsDialog> s = new SettingsDialog(this);
// keep us informed when the user changes settings
- connect(s, SIGNAL(settingsChanged(const QString&)), this, SLOT(updateBrowser()));
+ connect(s.data(), SIGNAL(settingsChanged(const QString&)), this, SLOT(updateBrowser()));
- s->exec();
- delete s;
+ s.data()->exec();
+ delete s.data();
+ s.clear();
}
@@ -1041,16 +1042,16 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status)
void MainWindow::clearPrivateData()
{
- QPointer<KDialog> dialog = new KDialog(this, Qt::Sheet);
- dialog->setButtons(KDialog::Ok | KDialog::Cancel);
+ QWeakPointer<KDialog> dialog = new KDialog(this, Qt::Sheet);
+ dialog.data()->setButtons(KDialog::Ok | KDialog::Cancel);
Ui::ClearDataWidget clearWidget;
QWidget widget;
clearWidget.setupUi(&widget);
- dialog->setMainWidget(&widget);
+ dialog.data()->setMainWidget(&widget);
- if (dialog->exec() == KDialog::Accepted)
+ if (dialog.data()->exec() == KDialog::Accepted)
{
if(clearWidget.clearHistory->isChecked())
{