1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

Try to return active window in MainApplication::getWindow

This commit is contained in:
nowrep 2012-08-23 15:52:07 +02:00
parent 60ae2c1705
commit 983df81ee0

View File

@ -410,12 +410,19 @@ void MainApplication::setupJumpList()
QupZilla* MainApplication::getWindow() QupZilla* MainApplication::getWindow()
{ {
QupZilla* activeW = qobject_cast<QupZilla*>(activeWindow());
if (activeW) {
return activeW;
}
for (int i = 0; i < m_mainWindows.count(); i++) { for (int i = 0; i < m_mainWindows.count(); i++) {
if (!m_mainWindows.at(i)) { if (!m_mainWindows.at(i)) {
continue; continue;
} }
return m_mainWindows.at(i).data(); return m_mainWindows.at(i).data();
} }
return 0; return 0;
} }