Plan: fix build with Qt 5.6
ClosedPublic

Authored by wbauer on Mar 20 2018, 9:28 AM.

Details

Summary

The QAction constructor takes two arguments, text and parent.
The parent argument is optional since Qt 5.7 only, it needs to be specified with earlier versions.

Also, text should actually be a QString, so use QStringLiteral to "convert" it.

Test Plan

Compiles with Qt 5.6 now, before I got this error:

/home/abuild/rpmbuild/BUILD/calligraplan-3.1.0/src/libs/ui/kpttaskeditor.cpp: In member function 'void KPlato::TaskEditor::editTasks(const QList<KPlato::Task*>&, const QPoint&)':
/home/abuild/rpmbuild/BUILD/calligraplan-3.1.0/src/libs/ui/kpttaskeditor.cpp:625:32: error: no matching function for call to 'QAction::QAction(const char [8])'
     QAction tasksEdit("Edit...");
                                ^

Still compiles with Qt 5.9.4 and 5.10.0 too.

Diff Detail

Repository
R8 Calligra
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
wbauer created this revision.Mar 20 2018, 9:28 AM
Restricted Application added a project: Calligra: 3.0. · View Herald TranscriptMar 20 2018, 9:28 AM
wbauer requested review of this revision.Mar 20 2018, 9:28 AM
danders accepted this revision.Mar 20 2018, 12:25 PM

Hmm, it should have been i18n'ed also. I'll fix that later, just land it.

This revision is now accepted and ready to land.Mar 20 2018, 12:25 PM
This revision was automatically updated to reflect the committed changes.