mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-29 08:39:41 +01:00
Removed image url action from webview for QT < 4.8.
This commit is contained in:
parent
75bb3a25d3
commit
265ae0bfc1
@ -55,7 +55,11 @@ void BaseWebView::setupIcons() {
|
|||||||
m_actionReload->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
|
m_actionReload->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
|
||||||
m_actionCopyLink->setIcon(IconThemeFactory::getInstance()->fromTheme("edit-copy"));
|
m_actionCopyLink->setIcon(IconThemeFactory::getInstance()->fromTheme("edit-copy"));
|
||||||
m_actionCopyImage->setIcon(IconThemeFactory::getInstance()->fromTheme("insert-image"));
|
m_actionCopyImage->setIcon(IconThemeFactory::getInstance()->fromTheme("insert-image"));
|
||||||
|
|
||||||
|
#if QT_VERSION >= 0x040800
|
||||||
m_actionCopyImageUrl->setIcon(IconThemeFactory::getInstance()->fromTheme("edit-copy"));
|
m_actionCopyImageUrl->setIcon(IconThemeFactory::getInstance()->fromTheme("edit-copy"));
|
||||||
|
#endif
|
||||||
|
|
||||||
m_actionOpenLinkThisTab->setIcon(IconThemeFactory::getInstance()->fromTheme("text-html"));
|
m_actionOpenLinkThisTab->setIcon(IconThemeFactory::getInstance()->fromTheme("text-html"));
|
||||||
m_actionOpenLinkNewTab->setIcon(IconThemeFactory::getInstance()->fromTheme("text-html"));
|
m_actionOpenLinkNewTab->setIcon(IconThemeFactory::getInstance()->fromTheme("text-html"));
|
||||||
m_actionOpenImageNewTab->setIcon(IconThemeFactory::getInstance()->fromTheme("insert-image"));
|
m_actionOpenImageNewTab->setIcon(IconThemeFactory::getInstance()->fromTheme("insert-image"));
|
||||||
@ -78,10 +82,12 @@ void BaseWebView::initializeActions() {
|
|||||||
m_actionCopyImage->setText(tr("Copy image"));
|
m_actionCopyImage->setText(tr("Copy image"));
|
||||||
m_actionCopyImage->setToolTip(tr("Copy image to clipboard"));
|
m_actionCopyImage->setToolTip(tr("Copy image to clipboard"));
|
||||||
|
|
||||||
|
#if QT_VERSION >= 0x040800
|
||||||
m_actionCopyImageUrl = pageAction(QWebPage::CopyImageUrlToClipboard);
|
m_actionCopyImageUrl = pageAction(QWebPage::CopyImageUrlToClipboard);
|
||||||
m_actionCopyImageUrl->setParent(this);
|
m_actionCopyImageUrl->setParent(this);
|
||||||
m_actionCopyImageUrl->setText(tr("Copy image url"));
|
m_actionCopyImageUrl->setText(tr("Copy image url"));
|
||||||
m_actionCopyImageUrl->setToolTip(tr("Copy image url to clipboard"));
|
m_actionCopyImageUrl->setToolTip(tr("Copy image url to clipboard"));
|
||||||
|
#endif
|
||||||
|
|
||||||
m_actionOpenLinkNewTab = pageAction(QWebPage::OpenLinkInNewWindow);
|
m_actionOpenLinkNewTab = pageAction(QWebPage::OpenLinkInNewWindow);
|
||||||
m_actionOpenLinkNewTab->setParent(this);
|
m_actionOpenLinkNewTab->setParent(this);
|
||||||
@ -144,7 +150,10 @@ void BaseWebView::popupContextMenu(const QPoint &pos) {
|
|||||||
if (hit_image_url.isValid()) {
|
if (hit_image_url.isValid()) {
|
||||||
m_contextImageUrl = hit_image_url;
|
m_contextImageUrl = hit_image_url;
|
||||||
image_submenu.addAction(m_actionOpenImageNewTab);
|
image_submenu.addAction(m_actionOpenImageNewTab);
|
||||||
|
|
||||||
|
#if QT_VERSION >= 0x040800
|
||||||
image_submenu.addAction(m_actionCopyImageUrl);
|
image_submenu.addAction(m_actionCopyImageUrl);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
image_submenu.addAction(m_actionCopyImage);
|
image_submenu.addAction(m_actionCopyImage);
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,11 @@ class BaseWebView : public QWebView {
|
|||||||
QAction *m_actionReload;
|
QAction *m_actionReload;
|
||||||
QAction *m_actionCopyLink;
|
QAction *m_actionCopyLink;
|
||||||
QAction *m_actionCopyImage;
|
QAction *m_actionCopyImage;
|
||||||
|
|
||||||
|
#if QT_VERSION >= 0x040800
|
||||||
QAction *m_actionCopyImageUrl;
|
QAction *m_actionCopyImageUrl;
|
||||||
|
#endif
|
||||||
|
|
||||||
QAction *m_actionOpenLinkThisTab;
|
QAction *m_actionOpenLinkThisTab;
|
||||||
QAction *m_actionOpenLinkNewTab;
|
QAction *m_actionOpenLinkNewTab;
|
||||||
QAction *m_actionOpenImageNewTab;
|
QAction *m_actionOpenImageNewTab;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user