summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-05-04 09:19:16 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-05-04 09:19:16 +0200
commit7ea1b6add7ebef4d475801e15e89992e734617c1 (patch)
treea083886be1493a1616ef380e8ccad40e09e49e1f /src/mainwindow.cpp
parentFix conflicts (diff)
downloadrekonq-7ea1b6add7ebef4d475801e15e89992e734617c1.tar.xz
Memory leaks fixes
first bunch
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 28c7dff1..a598128b 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -157,8 +157,27 @@ MainWindow::~MainWindow()
{
Application::bookmarkProvider()->removeToolBar(m_bmBar);
Application::instance()->removeMainWindow(this);
- delete m_popup;
+
+ delete m_view;
+ delete m_findBar;
+
+ delete m_historyPanel;
+ delete m_bookmarksPanel;
+ delete m_webInspectorPanel;
+
+ delete m_stopReloadAction;
+ delete m_historyBackMenu;
delete m_encodingMenu;
+
+ delete m_mainBar;
+ delete m_bmBar;
+
+ delete m_zoomSlider;
+
+ delete m_popup;
+ delete m_hidePopup;
+
+ delete m_ac;
}
@@ -168,7 +187,7 @@ void MainWindow::setupToolbars()
m_mainBar->addAction(actionByName(KStandardAction::name(KStandardAction::Back)));
m_mainBar->addAction(actionByName(KStandardAction::name(KStandardAction::Forward)));
m_mainBar->addSeparator();
- m_mainBar->addAction(actionByName("stop_reload"));
+ m_mainBar->addAction(actionByName( QL1S("stop_reload") ));
m_mainBar->addAction(actionByName(KStandardAction::name(KStandardAction::Home)));
// location bar
@@ -176,8 +195,8 @@ void MainWindow::setupToolbars()
urlBarAction->setDefaultWidget(m_view->urlBarWidget());
m_mainBar->addAction(urlBarAction);
- m_mainBar->addAction(actionByName("bookmarksActionMenu"));
- m_mainBar->addAction(actionByName("rekonq_tools"));
+ m_mainBar->addAction(actionByName( QL1S("bookmarksActionMenu") ));
+ m_mainBar->addAction(actionByName( QL1S("rekonq_tools") ));
m_mainBar->show(); // this just to fix reopening rekonq after fullscreen close
@@ -691,7 +710,7 @@ void MainWindow::privateBrowsing(bool enable)
}
else
{
- actionCollection()->action("private_browsing")->setChecked(false);
+ actionCollection()->action( QL1S("private_browsing") )->setChecked(false);
}
}
else
@@ -1014,7 +1033,7 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
}
-QAction *MainWindow::actionByName(const QString name)
+QAction *MainWindow::actionByName(const QString &name)
{
QAction *ret = actionCollection()->action(name);