diff options
author | Steven Boswell <ulatekh@yahoo.com> | 2014-03-29 14:37:30 -0400 |
---|---|---|
committer | RJ Ryan <rryan@mixxx.org> | 2014-03-29 14:37:30 -0400 |
commit | 477174772cf1b482833d03ba39211da280eb3ec3 (patch) | |
tree | d58b597f3f7296e94889867a3c8c1bc05c0b93c0 /src | |
parent | 955f927c77a89dcd41f57f6b9b841a5f5bd50d76 (diff) |
Various build system fixes for Windows (and particularly MingW cross-compiling to Windows). Fixes Bug #1179683.
Diffstat (limited to 'src')
-rw-r--r-- | src/SConscript | 8 | ||||
-rw-r--r-- | src/controllers/controllermanager.cpp | 2 | ||||
-rw-r--r-- | src/library/browse/foldertreemodel.cpp | 2 | ||||
-rw-r--r-- | src/library/treeitemmodel.cpp | 6 | ||||
-rw-r--r-- | src/sampleutil.cpp | 5 |
5 files changed, 18 insertions, 5 deletions
diff --git a/src/SConscript b/src/SConscript index a0ebdce565..cf3d84e1be 100644 --- a/src/SConscript +++ b/src/SConscript @@ -40,11 +40,15 @@ if build.platform_is_windows: str_list.append('#define VER_FILEVERSION ') # Remove anything after ~ or - in the version number and replace the dots with commas str_list.append(mixxx_version.partition('~')[0].partition('-')[0].replace('.',',')) - str_list.append(','+str(vcs_revision)+'\n') + if vcs_revision: + str_list.append(','+str(vcs_revision)) + str_list.append('\n') str_list.append('#define VER_PRODUCTVERSION ') str_list.append(mixxx_version.partition('~')[0].partition('-')[0].replace('.',',')) - str_list.append(','+str(vcs_revision)+'\n') + if vcs_revision: + str_list.append(','+str(vcs_revision)) + str_list.append('\n') import datetime now = datetime.datetime.now() diff --git a/src/controllers/controllermanager.cpp b/src/controllers/controllermanager.cpp index db167c3dce..f1578f2a5c 100644 --- a/src/controllers/controllermanager.cpp +++ b/src/controllers/controllermanager.cpp @@ -78,7 +78,9 @@ ControllerManager::ControllerManager(ConfigObject<ConfigValue>* pConfig) m_pPresetInfoManager = new PresetInfoEnumerator(m_pConfig); // Instantiate all enumerators +#ifdef __PORTMIDI__ m_enumerators.append(new PortMidiEnumerator()); +#endif // __PORTMIDI__ #ifdef __HSS1394__ m_enumerators.append(new Hss1394Enumerator()); #endif diff --git a/src/library/browse/foldertreemodel.cpp b/src/library/browse/foldertreemodel.cpp index 895c98e95e..8f80f04770 100644 --- a/src/library/browse/foldertreemodel.cpp +++ b/src/library/browse/foldertreemodel.cpp @@ -1,7 +1,7 @@ #if defined (__WINDOWS__) #include <windows.h> #include <Shellapi.h> -#include <Shobjidl.h> +#include <Shlobj.h> #else #include <sys/types.h> #include <sys/stat.h> diff --git a/src/library/treeitemmodel.cpp b/src/library/treeitemmodel.cpp index 2b4577b8c7..90e1a4c5f3 100644 --- a/src/library/treeitemmodel.cpp +++ b/src/library/treeitemmodel.cpp @@ -161,6 +161,9 @@ void TreeItemModel::setRootItem(TreeItem *item) { * make sure you have initialized */ bool TreeItemModel::insertRows(QList<TreeItem*> &data, int position, int rows, const QModelIndex &parent) { + if (rows == 0) { + return true; + } TreeItem *parentItem = getItem(parent); bool success; @@ -172,6 +175,9 @@ bool TreeItemModel::insertRows(QList<TreeItem*> &data, int position, int rows, c } bool TreeItemModel::removeRows(int position, int rows, const QModelIndex &parent) { + if (rows == 0) { + return true; + } TreeItem *parentItem = getItem(parent); bool success = true; diff --git a/src/sampleutil.cpp b/src/sampleutil.cpp index 05c47d59b8..367704e98d 100644 --- a/src/sampleutil.cpp +++ b/src/sampleutil.cpp @@ -3,8 +3,9 @@ #ifdef __WINDOWS__ #pragma intrinsic(fabs)sc -typedef __int64 int64_t; -typedef __int32 int32_t; +#include <QtGlobal> +typedef qint64 int64_t; +typedef qint32 int32_t; #endif #include <QtDebug> |