1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Merge pull request #760 from srazi/master

Fixed some platform specific issues.
This commit is contained in:
David Rosca 2013-02-16 13:29:50 -08:00
commit e718e00e5c
8 changed files with 39 additions and 5 deletions

View File

@ -431,10 +431,14 @@ void QupZilla::setupMenu()
#endif
m_actionTabsOnTop = new QAction(tr("&Tabs on Top"), MENU_RECEIVER);
m_actionTabsOnTop->setCheckable(true);
connect(m_actionTabsOnTop, SIGNAL(triggered(bool)), this, SLOT(triggerTabsOnTop(bool)));
connect(m_actionTabsOnTop, SIGNAL(triggered(bool)), MENU_RECEIVER, SLOT(triggerTabsOnTop(bool)));
m_actionShowFullScreen = new QAction(tr("&Fullscreen"), MENU_RECEIVER);
m_actionShowFullScreen->setCheckable(true);
#ifndef Q_OS_MAC
m_actionShowFullScreen->setShortcut(QKeySequence("F11"));
#else
m_actionShowFullScreen->setShortcut(QKeySequence("Ctrl+F11"));
#endif
connect(m_actionShowFullScreen, SIGNAL(triggered(bool)), MENU_RECEIVER, SLOT(fullScreen(bool)));
m_actionStop = new QAction(qIconProvider->standardIcon(QStyle::SP_BrowserStop), tr("&Stop"), MENU_RECEIVER);
connect(m_actionStop, SIGNAL(triggered()), MENU_RECEIVER, SLOT(stop()));
@ -644,6 +648,7 @@ void QupZilla::setupMacMenu()
m_menuTools = menuBar()->actions().at(5)->menu();
m_menuHelp = menuBar()->actions().at(6)->menu();
m_toolbarsMenu = m_menuView->actions().at(0)->menu();
m_menuEncoding = m_menuView->actions().at(12)->menu();
m_menuHistoryRecent = qobject_cast<Menu*>(m_menuHistory->actions().at(5)->menu());
@ -658,6 +663,7 @@ void QupZilla::setupMacMenu()
m_actionShowToolbar = m_menuView->actions().at(0)->menu()->actions().at(0);
m_actionShowBookmarksToolbar = m_menuView->actions().at(0)->menu()->actions().at(1);
m_actionTabsOnTop = m_menuView->actions().at(0)->menu()->actions().at(3);
m_actionShowStatusbar = m_menuView->actions().at(2);
m_actionStop = m_menuView->actions().at(4);
m_actionReload = m_menuView->actions().at(5);
@ -764,6 +770,7 @@ void QupZilla::loadSettings()
m_navigationBar->installEventFilter(this);
m_bookmarksToolbar->installEventFilter(this);
statusBar()->installEventFilter(this);
m_navigationContainer->installEventFilter(this);
}
#endif
}
@ -1574,6 +1581,12 @@ void QupZilla::triggerTabsOnTop(bool enable)
}
qzSettings->tabsOnTop = enable;
#ifdef Q_OS_WIN
if (QtWin::isCompositionEnabled()) {
applyBlurToMainWindow();
}
#endif
}
void QupZilla::refreshHistory()
@ -2376,10 +2389,23 @@ void QupZilla::applyBlurToMainWindow(bool force)
bool QupZilla::eventFilter(QObject* object, QEvent* event)
{
switch (event->type()) {
case QEvent::DeferredDelete:
case QEvent::Show:
case QEvent::Hide:
if (object == m_navigationContainer) {
m_navigationBar->removeEventFilter(this);
m_bookmarksToolbar->removeEventFilter(this);
break;
}
case QEvent::Show:
if (object == m_navigationContainer) {
m_navigationBar->installEventFilter(this);
m_bookmarksToolbar->installEventFilter(this);
break;
}
case QEvent::Resize:
case QEvent::DeferredDelete:
if (object == m_navigationContainer) {
break;
}
applyBlurToMainWindow();
break;
default:

View File

@ -29,6 +29,7 @@ AutoFillNotification::AutoFillNotification(const QUrl &url, const PageFormData &
, m_formData(formData)
, m_updateData(updateData)
{
setAutoFillBackground(true);
setAttribute(Qt::WA_DeleteOnClose);
ui->setupUi(widget());
ui->closeButton->setIcon(qIconProvider->standardIcon(QStyle::SP_DialogCloseButton));

View File

@ -158,6 +158,10 @@ void CookieManager::currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem
void CookieManager::refreshTable()
{
disconnect(ui->search, SIGNAL(textChanged(QString)), ui->cookieTree, SLOT(filterString(QString)));
ui->search->clear();
connect(ui->search, SIGNAL(textChanged(QString)), ui->cookieTree, SLOT(filterString(QString)));
QTimer::singleShot(0, this, SLOT(slotRefreshTable()));
QTimer::singleShot(0, this, SLOT(slotRefreshFilters()));
}

View File

@ -37,6 +37,7 @@ RSSNotification::RSSNotification(const QString &title, const QUrl &url, WebView*
, m_url(url)
, m_view(parent)
{
setAutoFillBackground(true);
setAttribute(Qt::WA_DeleteOnClose);
ui->setupUi(widget());

View File

@ -31,6 +31,7 @@ HTML5PermissionsNotification::HTML5PermissionsNotification(const QString &host,
, m_frame(frame)
, m_feature(feature)
{
setAutoFillBackground(true);
ui->setupUi(widget());
ui->close->setIcon(qIconProvider->standardIcon(QStyle::SP_DialogCloseButton));

View File

@ -326,7 +326,7 @@ QList<QTreeWidgetItem*> TreeWidget::allItems()
return m_allTreeItems;
}
void TreeWidget::filterString(QString string)
void TreeWidget::filterString(const QString &string)
{
expandAll();
QList<QTreeWidgetItem*> _allItems = allItems();

View File

@ -55,7 +55,7 @@ signals:
void folderParentChanged(const QString &name, bool isSubfolder, bool* ok);
public slots:
void filterString(QString string);
void filterString(const QString &string);
void clear();
private slots:

View File

@ -31,6 +31,7 @@ GM_Notification::GM_Notification(GM_Manager* manager, const QString &tmpfileName
, m_tmpFileName(tmpfileName)
, m_fileName(fileName)
{
setAutoFillBackground(true);
ui->setupUi(widget());
ui->close->setIcon(qIconProvider->standardIcon(QStyle::SP_DialogCloseButton));