OS:
macOS
Cockatrice version:
Any
Some new issues arose when our macOS packages started bundling Qt5.8.
This happened quite transparently to us, since out packages are built on Travis and install Qt from homebrew. When homebrew updated to Qt5.7, we started using it.
When we noticed that Qt5.8 was the cause of such problems, we forced the use of the last known working Qt5.7 (see commits 7f057612bf575422c55d050ea88bd49c71c37f16 and 38ad71b06a55fd8915c589bf07bf498cc71767a9)
This issue is a collector for all issues related to macOS and Qt5.8 that needs to be checked before trying to update the Qt version we use in the future:
Weirdly, I don't experience any of those issues on Arch Linux with Qt5.8... Maybe its an issue with brew's specific build of Qt5.8?
@skwerlman: MacOS only
Just tested Qt 5.9.1 for bug #2490 (keyboards shortcuts after sideboard), and it's still broken :(
I'm afraid we'll have to workaround it
Sounds like we'll be sticking with 5.7.1 for a while...
Did somebody retest with the recent Qt 5.10 yet?
Too bad that Qt 5.9 LTS has the same issues still according to @ctrlaltca.
Is there an issue at Qt for this? Are they aware of the problem?
[email protected] is discontinued at homebrew: https://github.com/Homebrew/homebrew-core/pull/23165#issuecomment-362270835
We have to either use [email protected] for now as a temporary solution, or look into Qt 5.10 with this issues.
For #2490, it looks like the problem isn't caused by side-boarding, but just opening a dialog will cause all sub-menu item shortcuts in the game menu to stop working (but shortcuts like for Next Turn will still be available). I can put together a minimum working example if anyone wants to look at it / see if they can find a workaround
That would be helpful
On Sat, Feb 10, 2018 at 1:22 AM Nick Beeuwsaert notifications@github.com
wrote:
For #2490 https://github.com/Cockatrice/Cockatrice/issues/2490, it
looks like the problem isn't caused by side-boarding, but just opening a
dialog will cause all sub-menu item shortcuts in the game menu to stop
working (but shortcuts like for Next Turn will still be available). I can
put together a minimum working example if anyone wants to look at it / see
if they can find a workaroundโ
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Cockatrice/Cockatrice/issues/2647#issuecomment-364629866,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA5NMBw-U9xweU0trN2SVPkVTzumA54ks5tTTWxgaJpZM4NHo4L
.
Alright here you go:
#include <QtWidgets/QApplication>
#include <QtWidgets/QLCDNumber>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QMenu>
#include <QtWidgets/QMenuBar>
#include <QtWidgets/QMessageBox>
int main(int argc, char* argv[]) {
QApplication app(argc, argv);
QMainWindow window;
QLCDNumber counter;
window.setCentralWidget(&counter);
auto menuBar = window.menuBar();
QMenu menu("Menu", menuBar), submenu("SubMenu", &menu);
QAction incrementMenuItem("Increment counter", &menu), incrementSubMenuItem("Increment counter (From Submenu)", &submenu),
showDialog("Show Dialog", &menu);
incrementMenuItem.setShortcut(QKeySequence(Qt::CTRL + Qt::Key_A));
incrementSubMenuItem.setShortcut(QKeySequence(Qt::CTRL + Qt::Key_S));
showDialog.setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D));
QObject::connect(&showDialog, &QAction::triggered, [&]() {
QMessageBox::information(&window, "Hello, world!", "Increment counter from submenu will no longer work");
});
auto increment = [&]() { counter.display(counter.intValue() + 1); };
QObject::connect(&incrementMenuItem, &QAction::triggered, increment);
QObject::connect(&incrementSubMenuItem, &QAction::triggered, increment);
submenu.addAction(&incrementSubMenuItem);
menu.addActions(QList<QAction*>() << &incrementMenuItem << &showDialog << submenu.menuAction());
menuBar->addAction(menu.menuAction());
// Potential work-around: add actions to widget as well as menu
// counter.addActions(QList<QAction*>() << &incrementMenuItem << &incrementSubMenuItem);
window.show();
return app.exec();
}
Using Qt 5.10.1, the problem seems to have been fixed ๐
Both the demo app by @NickBeeuwsaert and manual testing on a local game work!
EDIT: attached is an example qmake project to compile the demo app
CONFIG += qt
QT += widgets
SOURCES += test.cpp
TARGET = test
homebrew has 5.10.1 already ๐ !
Also, the cockatrice package at homebrew is using it already, in case somebody wants to test it: http://formulae.brew.sh/repos/Homebrew/homebrew-core/formula/cockatrice
Confirmed working on the homebrew version.
Btw the homebrew version is affected some of the bugs fixed in #3216, and is somewhat wrongly marked as depending on the qt formula, even if libraries are bundled inside the applications.
Btw the homebrew version (...) is somewhat wrongly marked as depending on the qt formula, even if libraries are bundled inside the applications.
Hmm, no idea. Could you possibly provide a patch for the formula file here then?
The last time i saw an app formula proposed, it was rejected since homebrew didn't accept GUI apps (i think they created caskroom for those apps). I don't get why a formula is there at all, but i dont' want to be the bad guy that points out the problems and gets the formula removed, so... ๐ ๐ ๐
That sounds weird... but I've no idea to be honest.
Cockatrice was added as a game by some guy in 2015: https://github.com/Homebrew/homebrew-core/pull/23117#issuecomment-359250694
And games without gui are not too common. :)
(homebrew-games is deprecated and got merged into core)
(homebrew-games is deprecated and got merged into core)
Ok, i missed that step, thank you ๐
Can this issue be closed btw @ctrlaltca?
We should be using 5.10.1 from homebrew by now.
qt@homebrew --> brew install qt
Yep!
Most helpful comment
Using Qt 5.10.1, the problem seems to have been fixed ๐
Both the demo app by @NickBeeuwsaert and manual testing on a local game work!
EDIT: attached is an example qmake project to compile the demo app