-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix windows Build: activate QT initializer lists #1019
Conversation
Does key sorting actually work, or does it just compile a broken program? |
does unit test let me know if key sorting work ? |
currently, it compiles a program that runs, I can click the "key" column header to sort, I obtain track list sorted by C -> Am -> G -> Em -> D -> Bm -> A -> F#m -> E -> C#m -> B -> G#m -> F#/Gb -> ... |
No, there isn't an automated test for it.
That's working :) |
@@ -1,3 +1,11 @@ | |||
// Horrible Hack to workaround QT 4.8 bug with MSVC compiler. lp:1627826 | |||
// QT 4.8 explicitely disable Initializer list, but initializer list is | |||
// supported with MSVC 2012 SP2 + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean MSVC 2013 SP2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I mean 2012 SP2. Initialiser lists are broken before 2012 SP2. They have always been OK with 2013, but disabled by QT4 code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you were right. I meant VC12, which is VS2013. updated.
// supported with MSVC 2012 SP2 + | ||
// http://code.qt.io/cgit/qt/qt.git/tree/src/corelib/global/qglobal.h#n910 | ||
// TODO(XXX): Remove after QT4 deprecation, unneeded with QT5 | ||
#ifdef __WINDOWS__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Zaren, change this to #if _MSC_VER >= 1800 // VC 12 (Or #if _MSC_FULL_VER >= 180030324 if you prefer.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
"#if _MSC_FULL_VER >= 180030324" does not work on my copy of Visual Studio 2013. My copy of Visual Studio 2013 is up to date. You need to use "_MSC_VER >= 1800" to allow Visual Studio 2013 and above. |
@czchmate strange, this means you can not use initializer lists event qith QT5. This piece of code is exactly taken from QT5's sources: https://gitorious.org/qt/qtbase?p=qt:qtbase.git;a=blob;f=src/corelib/global/qcompilerdetection.h;h=f8a8a436bec0d607a0bb58bf6bd455ac79afb0f7;hb=HEAD#l874 |
@czchmate what is the version reported by |
Thank you for taking care :-) I am just wonder why you limit the hack to a specific VC version? Is it merge-able? |
I'm using compiler 18.00.21005.1 with QT 4.8.6. The Mixxx Windows build instructions say to use 4.8.6, https://www.mixxx.org/wiki/doku.php/compiling_on_windows. |
Maybe I was unclear. I am using compiler 18.00.21005.1 (Visual Studio Express 2013) with QT 4.8.6. Using the following code allows the program to compile:
Compilation fails using the other code:
The version is incorrect. All versions of Visual Studio 2013 or higher (_MSC_VER >= 1800) can use initializer lists. This is shown in Microsoft's documentation: https://msdn.microsoft.com/en-us/en-en/library/hh567368.aspx. There is no reason to go to use _MSC_FULL_VER when _MSC_VER will suffice. |
|
@czchmate |
additionally, not all flavor of initializer lists are implemented in MSVS: https://msdn.microsoft.com/en-us/library/dn793970.aspx |
Ok, It looks like the issue is fixed for now. So lets merge it. |
@czchmate Yes, we need to update the Wiki to say 4.8.7. Sorry about that. |
Thanks for taking care of this! |
Yes, thanks! Your speed at fixing the bugs I have reported has been tremendous. Top notch development team here! |
This PR fixes windows build lp:1627826
For the record:
even if MSVC 2013 compiler supports initializer lists, QT 4.8 explicitly disables initializer lists with MSVC due to old MSVC 2012 bug.
http://code.qt.io/cgit/qt/qt.git/tree/src/corelib/global/qglobal.h#n910