-
Notifications
You must be signed in to change notification settings - Fork 13
GUI: Port to Qt #7
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
Conversation
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.
Very nice, this is exactly what I was looking for! :D
There's a few minor things:
- Two commits could be split into two each
- Comments meant to group methods shouldn't be Doxygen comments (Doxygen just gets confused by them)
- There's no need to make a Doxygen comment span two multiple lines if there's no further longer explanation
- I'd like some an acknowledgement of Verdigris in the AUTHORS file and the debian copyright file
I marked those in the invididual commits as well.
If you have any problems wrangling git into splitting commits or otherwise changing the history with an interactive git rebase, please say so and I'll change the commits myself.
Otherwise, I very happy with this PR. :)
@@ -289,6 +280,7 @@ endif() | |||
set(HAVE_PTHREAD ${CMAKE_USE_PTHREADS_INIT}) | |||
if(CMAKE_USE_PTHREADS_INIT) | |||
set(PTHREAD_LIBS ${CMAKE_THREAD_LIBS_INIT}) | |||
list(APPEND PHAETHON_LIBRARIES ${PTHREAD_LIBS}) |
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.
Can you put the pthread-thing into its own commit, before this one? Because that's technically a separate issue.
m4/ax_check_qt5.m4
Outdated
Qt5Widgets >= $1 \ | ||
Qt5Multimedia >= $1 \ | ||
Qt5Concurrent >= $1 \ | ||
], [$2], [$3]) |
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.
Unfortunately, the indentations here will make this look weird when the configure script runs. So best put this in one long line.
noinst_HEADERS += \ | ||
verdigris/wobjectdefs.h \ | ||
verdigris/wobjectimpl.h \ | ||
$(EMPTY) |
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.
Can you also add a README.Phaethon file into the verdigris directory, with the contents
This is the source of Verdigris (<https://github.com/woboq/verdigris>),
based on the git revision .
(and the revision you based it on filled in there).
Also, add a section for it in the AUTHORS file (probably right after UTF-8 CPP):
Verdigris
*********
Phaethon uses and includes the header-only library Verdigris
(<https://github.com/woboq/verdigris>) to use Qt5 without moc. Verdigris
is licensed under version 3 or later of the Lesser GNU General Public
License. For the full license texts, see LICENSE.LGPLv3 or
<https://gnu.org/licenses/lgpl-3.0.html>.
And drop in that license file in plaintext.
Likewise, add the two Verdigris files to dists/debian/copyright:
Files: verdigris/wobjectdefs.h
verdigris/wobjectimpl.h
Copyright: 2016-2018 Woboq GmbH
License: LGPL-3.0+
And you then need a section
License: LGPL-3.0+
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
On Debian systems, the complete text of the GNU Library General Public License
can be found in the file "/usr/share/common-licenses/LGPL-3".
at the bottom of the copyright file.
This should all go within this commit, please.
|
||
STD="" | ||
if test "x$with_std" = "xyes"; then | ||
AX_CHECK_COMPILER_FLAGS_VAR([C++], [STD], [-std=c++03]) | ||
AX_CHECK_COMPILER_FLAGS_VAR([C++], [STD], [-std=c++14]) |
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.
Pushing the C++ standard to C++14 should be it own commit, please.
src/gui/resourcetree.h
Outdated
*/ | ||
ResourceTreeItem *itemFromIndex(const QModelIndex &index) const; | ||
|
||
/** Model functions. */ |
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.
Comments to denote a "section" shouldn't be Doxygen comments (i.e. please use /*
here instead of /**
)
This applies to resourcetreeitem.h as well and further commits as well.
src/gui/resourcetree.h
Outdated
/** Model functions. */ | ||
|
||
/** Return the index if it exists, else create it. | ||
*/ |
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.
Please remove these line breaks inside the Doxygen comments here. There's no need to make the comment span two lines.
This applies to resourcetreeitem.h as well and further commits as well.
It was previously provided by wxWidgets.
C++14 is required by Verdigris.
Proxy model is a necessary class for sorting items.
This looks quite good now, yes. I pushed it to the temporary https://github.com/xoreos/phaethon/tree/qttravis branch to see what Travis CI says. :) How do you want to be credited in the AUTHORS file now? And should I also change your line in the xoreos AUTHORS file? |
And yes, please do change the one in xoreos. |
Merged as 2dc7e82...7d5b853, thanks! :D |
Hmm, is there a reason for the dependency on QtMultimedia? It doesn't seem to be needed, it seems. I mean, we do have our own sound mixer, powered by OpenAL, after all. I'm currently exploring potentially creating release packages of Phaethon. For Linux, I'm using a Debian chroot (Debian Stretch, for Phaethon). The thing is, the QtMultimedia in Debian pulls in pulseaudio, which pulls in systemd... which is not something I can distribute. So I'd need to compile Qt myself in the chroot. I'd rather not, honestly. And if that can be prevented by not requiring QtMultimedia, that would make me happy. |
I think it's a relic from a previous iteration of phaethon-qt, in which I used it for sound and/or images. |
Updates: