diff --git a/src/lib/navigation/locationbar.cpp b/src/lib/navigation/locationbar.cpp
index 0a9e64074..4ec67c961 100644
--- a/src/lib/navigation/locationbar.cpp
+++ b/src/lib/navigation/locationbar.cpp
@@ -49,7 +49,6 @@ LocationBar::LocationBar(QupZilla* mainClass)
: LineEdit(mainClass)
, p_QupZilla(mainClass)
, m_webView(0)
- , m_menu(new QMenu(this))
, m_pasteAndGoAction(0)
, m_clearAction(0)
, m_holdingAlt(false)
@@ -324,13 +323,11 @@ void LocationBar::contextMenuEvent(QContextMenuEvent* event)
}
QMenu* tempMenu = createStandardContextMenu();
- m_menu->clear();
+ QMenu menu(this);
int i = 0;
foreach(QAction * act, tempMenu->actions()) {
- act->setParent(m_menu);
- tempMenu->removeAction(act);
- m_menu->addAction(act);
+ menu.addAction(act);
switch (i) {
case 0:
@@ -347,13 +344,13 @@ void LocationBar::contextMenuEvent(QContextMenuEvent* event)
break;
case 5:
act->setIcon(QIcon::fromTheme("edit-paste"));
- m_menu->addAction(act);
- m_menu->addAction(m_pasteAndGoAction);
+ menu.addAction(act);
+ menu.addAction(m_pasteAndGoAction);
break;
case 6:
act->setIcon(QIcon::fromTheme("edit-delete"));
- m_menu->addAction(act);
- m_menu->addAction(m_clearAction);
+ menu.addAction(act);
+ menu.addAction(m_clearAction);
break;
case 8:
act->setIcon(QIcon::fromTheme("edit-select-all"));
@@ -362,14 +359,14 @@ void LocationBar::contextMenuEvent(QContextMenuEvent* event)
++i;
}
- tempMenu->deleteLater();
-
m_pasteAndGoAction->setEnabled(!QApplication::clipboard()->text().isEmpty());
- //Prevent choosing first option with double rightclick
+ // Prevent choosing first option with double rightclick
QPoint pos = event->globalPos();
QPoint p(pos.x(), pos.y() + 1);
- m_menu->popup(p);
+ menu.exec(p);
+
+ tempMenu->deleteLater();
}
void LocationBar::focusInEvent(QFocusEvent* event)
@@ -595,7 +592,7 @@ void LocationBar::paintEvent(QPaintEvent* event)
{
if (hasFocus() || text().isEmpty() || m_forceLineEditPaintEvent) {
LineEdit::paintEvent(event);
- if(m_forceLineEditPaintEvent) {
+ if (m_forceLineEditPaintEvent) {
m_forceLineEditPaintEvent = false;
update();
}
diff --git a/src/lib/navigation/locationbar.h b/src/lib/navigation/locationbar.h
index a7cd1b0f6..a27e44ac4 100644
--- a/src/lib/navigation/locationbar.h
+++ b/src/lib/navigation/locationbar.h
@@ -115,7 +115,6 @@ private:
QupZilla* p_QupZilla;
TabbedWebView* m_webView;
- QMenu* m_menu;
QAction* m_pasteAndGoAction;
QAction* m_clearAction;
diff --git a/src/lib/navigation/websearchbar.cpp b/src/lib/navigation/websearchbar.cpp
index b2868ea8b..1361f9472 100644
--- a/src/lib/navigation/websearchbar.cpp
+++ b/src/lib/navigation/websearchbar.cpp
@@ -303,8 +303,6 @@ void WebSearchBar::contextMenuEvent(QContextMenuEvent* event)
++i;
}
- tempMenu->deleteLater();
-
menu.addSeparator();
QAction* act = menu.addAction(tr("Show suggestions"));
act->setCheckable(true);
@@ -318,10 +316,12 @@ void WebSearchBar::contextMenuEvent(QContextMenuEvent* event)
m_pasteAndGoAction->setEnabled(!QApplication::clipboard()->text().isEmpty());
- //Prevent choosing first option with double rightclick
+ // Prevent choosing first option with double rightclick
QPoint pos = event->globalPos();
QPoint p(pos.x(), pos.y() + 1);
menu.exec(p);
+
+ tempMenu->deleteLater();
}
void WebSearchBar::focusOutEvent(QFocusEvent* e)
diff --git a/translations/homepage/pl_PL.php b/translations/homepage/pl_PL.php
index 7b2ebb30c..408bc8c49 100644
--- a/translations/homepage/pl_PL.php
+++ b/translations/homepage/pl_PL.php
@@ -70,9 +70,6 @@ $translating_moreinfo = "Więcej informacji o tłumaczeniu tutaj [github].
Możesz także dołączyć do kanału IRC #qupzilla w sieci irc.freenode.net aby porozmawiać z osobami zaangażowanymi w rozwój QupZilli.";
-// You can delete these (commented) lines after you translate $creators and $creators_text
-//$contributors = "Contributors";
-//$contributors_text = "Full list of contributors can be found on github.
You can also join IRC channel #qupzilla at irc.freenode.net.";
$share_with_friends = "Podziel się ze znajomymi!";
$share_with_friends_text = "Lubisz QupZillę? W takim razie podziel się nią ze swoimi znajomymi!";
?>