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
MainWindow.cpp - Build fails on Apple #1633
Comments
Ok, this looks like a compatibility issues with the initializer list and Clang. We should remove the shortcut code for compat. http://stackoverflow.com/questions/10991274/initializer-list-in-clang |
Proposal: // Add editor subwindows
QList<QWidget*> widgets;
widgets.append(gui->automationEditor());
widgets.append(gui->getBBEditor());
widgets.append(gui->pianoRoll());
widgets.append(gui->songEditor());
for (QWidget* widget : widgets)
{
QMdiSubWindow* window = workspace()->addSubWindow(widget);
window->setWindowIcon(widget->windowIcon());
window->setAttribute(Qt::WA_DeleteOnClose, false);
window->resize(widget->sizeHint());
} (alternately you could move this to gui() class and generate this list internally and do for |
Clang supports initializer lists as of 3.1. Try changing QList<QWidget*>{…,…} to QList<QWidget*>({…,…}) (putting parentheses around the initializer list) |
@lukas-w, I tried that last night and again just now for sanity's sake... No dice here... |
Hm… What Qt version are you using? I just saw in the Qt docs that QList's constructor supports initializer_list since Qt 4.8, but I wonder why Travis (Qt 4.6) isn't failing there if that's the case. |
Ah scratch that, Travis has Qt 4.8. |
As linked in the article, I think it's a language standard that needs to be enabled in Clang. I don't know much about these, but since it compiles fine otherwise, I don't see the harm in splitting this out. 👯 |
Specifically, the part that says:
That might help here... I started looking into these standards when fixing SWH plugins and my mind exploded. |
That'd be So you're using Qt 4.8? If not, that's most likely the cause of this issue. |
Well, initializer_list is a great addition of C++11, so I think it's important to know if the issue you're having is Qt or Clang related. |
According to what I'm reading, the I started researching other places this might have been broken to no avail... |
Take a look at https://trac.macports.org/changeset/102010 Apparently C++11 is not enabled in Macport's Qt by default. |
Good find. (or bad find, given the impact). What do you recommend we do? I can do an |
... Also we can switch to Homebrew and hope they've fixed this, but I won't have time to do that for a few weeks at least. |
Either we change that code to not use C++11 or you recompile Qt with C++11 support on your machine. The latter sounds a lot more time-consuming ;) |
Yes, and not just my machine... Any machine (such as Jonathan, or more likely, Travis). -Tres |
Fixed via c7e3ab3 |
Meant to write #2271? |
👍 |
@lukas-w, not sure if this is related to some refactoring, some namespace issues, or what, but wanted to do some early 1.2 build testing on Apple to prepare for the eventual RC1.
The text was updated successfully, but these errors were encountered: