Fixes build with Qt5
Review Request #114530 - Created Dec. 18, 2013 and submitted
This patch fixes Marble buidl with Qt5. We were using a lot of depreceated stuff on Qt.
Compiles under Qt4 and 5.
|I don't see why QApplication::translate is used here originally. Bernhard, can you comment on this? I'd rather use plain ol' ...||Dennis Nienhüser|
I don't see why QApplication::translate is used here originally. Bernhard, can you comment on this? I'd rather use plain ol' tr() like in the rest of the file.
There's quite a lot of duplication here. Can you use a QMap<QString,QString> commonly to store the key/value pairs and iterate over it later on? Then we only have one place with an #ifdef
Review request changed
Part of the patch now uses a QMap to hold the strings so they are used later on.
Revision 2 (+38 -7)
Please push with the additional source code comments. I'd like to have the build fixed, but avoid regressions. We have a Qt5 jenkins build now btw., see http://build.kde.org/job/marble_master_qt5/
Can you add a FIXME comment asking why tr() is not used here? There should be a comment in the code at least explaining it.
This seems wrong in the original code as it overwrites the user configured plan setting (see above). Can you remove that line in a separate commit?
Can you add a FIXME comment here to have someone verify this actually works? I'm wondering about keys with special characters like %.