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

[MinGW] Some fixes for MinGW building

This commit is contained in:
nowrep 2014-02-10 20:49:54 +01:00
parent d91e6ef5a7
commit 018d7ec098
5 changed files with 49 additions and 20 deletions

View File

@ -27,7 +27,9 @@
// Windows only data definitions // Windows only data definitions
#ifdef W7TASKBAR #ifdef W7TASKBAR
#ifndef __MINGW32__
#define NOMINMAX #define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
#include <initguid.h> #include <initguid.h>
#define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK

View File

@ -39,7 +39,9 @@
*/ */
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
// Qt5 compile issue: http://comments.gmane.org/gmane.comp.lib.qt.user/4711 // Qt5 compile issue: http://comments.gmane.org/gmane.comp.lib.qt.user/4711
#ifndef __MINGW32__
#define NOMINMAX #define NOMINMAX
#endif
#ifdef W7API #ifdef W7API
#include <ShlObj.h> #include <ShlObj.h>
#include <shlwapi.h> #include <shlwapi.h>

View File

@ -12,13 +12,10 @@ DEFINES *= QUPZILLA_SHAREDLIBRARY
include(3rdparty/qtsingleapplication.pri) include(3rdparty/qtsingleapplication.pri)
include(../defines.pri) include(../defines.pri)
include(../../translations/translations.pri) include(../../translations/translations.pri)
include(plugins/qtwebkit/qtwebkit-plugins.pri)
CONFIG(debug, debug|release): include(../../tests/modeltest/modeltest.pri) CONFIG(debug, debug|release): include(../../tests/modeltest/modeltest.pri)
!mac:contains(DEFINES, USE_QTWEBKIT_2_2) {
include(plugins/qtwebkit/qtwebkit-plugins.pri)
}
unix:!contains(DEFINES, "DISABLE_DBUS") QT += dbus unix:!contains(DEFINES, "DISABLE_DBUS") QT += dbus
INCLUDEPATH += 3rdparty\ INCLUDEPATH += 3rdparty\

View File

@ -149,6 +149,7 @@ bool RegisterQAppAssociation::isVistaOrNewer()
void RegisterQAppAssociation::registerAssociation(const QString &assocName, AssociationType type) void RegisterQAppAssociation::registerAssociation(const QString &assocName, AssociationType type)
{ {
if (isVistaOrNewer()) { // Vista and newer if (isVistaOrNewer()) { // Vista and newer
#ifndef __MINGW32__
IApplicationAssociationRegistration* pAAR; IApplicationAssociationRegistration* pAAR;
HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration, HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
@ -187,6 +188,7 @@ void RegisterQAppAssociation::registerAssociation(const QString &assocName, Asso
pAAR->Release(); pAAR->Release();
} }
#endif // #ifndef __MINGW32__
} }
else { // Older than Vista else { // Older than Vista
QSettings regUserRoot(_UserRootKey, QSettings::NativeFormat); QSettings regUserRoot(_UserRootKey, QSettings::NativeFormat);
@ -246,9 +248,11 @@ void RegisterQAppAssociation::registerAllAssociation()
} }
if (!isVistaOrNewer()) { if (!isVistaOrNewer()) {
#ifndef __MINGW32__
// On Windows Vista or newer for updating icons 'pAAR->SetAppAsDefault()' // On Windows Vista or newer for updating icons 'pAAR->SetAppAsDefault()'
// calls 'SHChangeNotify()'. Thus, we just need care about older Windows. // calls 'SHChangeNotify()'. Thus, we just need care about older Windows.
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_FLUSHNOWAIT, 0 , 0); SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_FLUSHNOWAIT, 0 , 0);
#endif
} }
} }

View File

@ -1,24 +1,48 @@
HEADERS += $$PWD/qtwebkitplugin.h \ # Unix
$$PWD/notifications/notificationpresenter.h \ !mac:unix {
$$[QT_INSTALL_HEADERS]/QtWebKit/qwebkitplatformplugin.h \ buildNotifications = true
contains(DEFINES, USE_QTWEBKIT_2_3):system(pkg-config --exists hunspell) {
SOURCES += $$PWD/qtwebkitplugin.cpp \
$$PWD/notifications/notificationpresenter.cpp \
DEFINES *= QT_STATICPLUGIN
!mac:unix:contains(DEFINES, USE_QTWEBKIT_2_3):system(pkg-config --exists hunspell) {
buildSpellcheck = true buildSpellcheck = true
LIBS += $$system(pkg-config --libs hunspell) LIBS += $$system(pkg-config --libs hunspell)
} }
}
# Mac OS X
mac {
buildPlugin = false
}
# Windows
win32 { win32 {
win32-msvc* {
# QtWebKit 2.3 and Hunspell is now needed to build on Windows # QtWebKit 2.3 and Hunspell is now needed to build on Windows
buildNotifications = true
buildSpellcheck = true buildSpellcheck = true
LIBS += -llibhunspell LIBS += -llibhunspell
} }
else { # mingw
buildPlugin = false
}
}
!equals(buildPlugin, false) {
HEADERS += $$PWD/qtwebkitplugin.h \
$$[QT_INSTALL_HEADERS]/QtWebKit/qwebkitplatformplugin.h
SOURCES += $$PWD/qtwebkitplugin.cpp
DEFINES *= QT_STATICPLUGIN
}
else {
buildNotifications = false
buildSpellcheck = false
}
equals(buildNotifications, true) {
HEADERS += $$PWD/notifications/notificationpresenter.h
SOURCES += $$PWD/notifications/notificationpresenter.cpp
}
equals(buildSpellcheck, true) { equals(buildSpellcheck, true) {
HEADERS += $$PWD/spellcheck/spellcheck.h \ HEADERS += $$PWD/spellcheck/spellcheck.h \