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

Fixed, renamed QupZilla class to BrowserWindow everywhere

This commit is contained in:
S. Razi Alavizadeh 2014-02-25 22:06:13 +03:30
parent b6181315f7
commit 84ef3e9fda
3 changed files with 9 additions and 11 deletions

View File

@ -722,7 +722,7 @@ QKeySequence BrowserWindow::actionShortcut(QKeySequence shortcut, QKeySequence f
} }
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
void QupZilla::setupMacMenu() void BrowserWindow::setupMacMenu()
{ {
// menus // menus
m_menuFile = menuBar()->actions().at(0)->menu(); m_menuFile = menuBar()->actions().at(0)->menu();
@ -760,7 +760,7 @@ void QupZilla::setupMacMenu()
m_actionPrivateBrowsing = m_menuTools->actions().at(9); m_actionPrivateBrowsing = m_menuTools->actions().at(9);
} }
void QupZilla::refreshStateOfAllActions() void BrowserWindow::refreshStateOfAllActions()
{ {
mApp->macMenuReceiver()->aboutToShowFileMenu(m_menuFile); mApp->macMenuReceiver()->aboutToShowFileMenu(m_menuFile);
mApp->macMenuReceiver()->aboutToShowHistoryMenu(m_menuHistory); mApp->macMenuReceiver()->aboutToShowHistoryMenu(m_menuHistory);
@ -2351,10 +2351,10 @@ void BrowserWindow::moveToVirtualDesktop(int desktopId)
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#if (QT_VERSION < 0x050000) #if (QT_VERSION < 0x050000)
bool QupZilla::winEvent(MSG* message, long* result) bool BrowserWindow::winEvent(MSG* message, long* result)
{ {
#else #else
bool QupZilla::nativeEvent(const QByteArray &eventType, void* _message, long* result) bool BrowserWindow::nativeEvent(const QByteArray &eventType, void* _message, long* result)
{ {
Q_UNUSED(eventType) Q_UNUSED(eventType)
MSG* message = static_cast<MSG*>(_message); MSG* message = static_cast<MSG*>(_message);
@ -2406,7 +2406,7 @@ bool QupZilla::nativeEvent(const QByteArray &eventType, void* _message, long* re
#endif #endif
} }
void QupZilla::paintEvent(QPaintEvent* event) void BrowserWindow::paintEvent(QPaintEvent* event)
{ {
if (isTransparentBackgroundAllowed()) { if (isTransparentBackgroundAllowed()) {
QPainter p(this); QPainter p(this);
@ -2417,7 +2417,7 @@ void QupZilla::paintEvent(QPaintEvent* event)
QMainWindow::paintEvent(event); QMainWindow::paintEvent(event);
} }
void QupZilla::applyBlurToMainWindow(bool force) void BrowserWindow::applyBlurToMainWindow(bool force)
{ {
if (isClosing() || m_isStarting) { if (isClosing() || m_isStarting) {
return; return;
@ -2462,7 +2462,7 @@ void QupZilla::applyBlurToMainWindow(bool force)
QtWin::extendFrameIntoClientArea(this, leftMargin, topMargin, rightMargin, bottomMargin); QtWin::extendFrameIntoClientArea(this, leftMargin, topMargin, rightMargin, bottomMargin);
} }
bool QupZilla::eventFilter(QObject* object, QEvent* event) bool BrowserWindow::eventFilter(QObject* object, QEvent* event)
{ {
switch (event->type()) { switch (event->type()) {
case QEvent::Hide: case QEvent::Hide:

View File

@ -1269,7 +1269,7 @@ bool MainApplication::restoreStateSlot(BrowserWindow* window, RestoreData recove
foreach (const RestoreManager::WindowData &data, recoveryData) { foreach (const RestoreManager::WindowData &data, recoveryData) {
BrowserWindow* window = makeNewWindow(Qz::BW_OtherRestoredWindow); BrowserWindow* window = makeNewWindow(Qz::BW_OtherRestoredWindow);
window->restoreWindowState(data); window->restoreWindowState(data);
// for correct geometry calculation in QupZilla::setupUi() // for correct geometry calculation in BrowserWindow::setupUi()
mApp->processEvents(); mApp->processEvents();
} }

View File

@ -76,8 +76,6 @@ void MacMenuReceiver::setDisabledSelectedMenuActions(QMenu* menu, const QList<in
bool MacMenuReceiver::callSlot(const char* member, bool makeIfNoWindow, QGenericArgument val0, QGenericArgument val1) bool MacMenuReceiver::callSlot(const char* member, bool makeIfNoWindow, QGenericArgument val0, QGenericArgument val1)
{ {
//qDebug("MacMenuReceiver::callSlot: \'QupZilla::%s()\'", member);
BrowserWindow* qzWindow = mApp->getWindow(); BrowserWindow* qzWindow = mApp->getWindow();
if (!qzWindow) { if (!qzWindow) {
if (!makeIfNoWindow) { if (!makeIfNoWindow) {
@ -92,7 +90,7 @@ bool MacMenuReceiver::callSlot(const char* member, bool makeIfNoWindow, QGeneric
bool success = QMetaObject::invokeMethod(qzWindow, member, val0, val1); bool success = QMetaObject::invokeMethod(qzWindow, member, val0, val1);
if (!success) { if (!success) {
qCritical("Warning: try to invoke \'QupZilla::%s()\' with incorrect parameter(s) or no such slot.", member); qCritical("Warning: try to invoke \'BrowserWindow::%s()\' with incorrect parameter(s) or no such slot.", member);
// this should never happen, for now: // this should never happen, for now:
// we just ignore it! // we just ignore it!
} }