Qt: fix compilation with older Qt versions.
../ui/qt/widgets/copy_from_profile_menu.cpp:52:30: error: no matching function for call to 'QAction::QAction(QString&)' pa = new QAction(name); ^ ../ui/qt/widgets/copy_from_profile_menu.cpp:52:30: note: candidates are: In file included from /usr/include/qt5/QtWidgets/qmenu.h:40:0, from /usr/include/qt5/QtWidgets/QMenu:1, from ../ui/qt/widgets/copy_from_profile_menu.h:16, from ../ui/qt/widgets/copy_from_profile_menu.cpp:10: /usr/include/qt5/QtWidgets/qaction.h:174:5: note: QAction::QAction(QActionPrivate&, QObject*) QAction(QActionPrivate &dd, QObject *parent); Change-Id: Ib7cb7cf522f1a95d5f4c16b1dc8f2ada8e46793c Reviewed-on: https://code.wireshark.org/review/34081 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
parent
970524e329
commit
5ca4756e1b
|
@ -49,7 +49,7 @@ CopyFromProfileMenu::CopyFromProfileMenu(QString filename, QWidget *parent) :
|
|||
continue;
|
||||
|
||||
QString name = idx.data().toString();
|
||||
pa = new QAction(name);
|
||||
pa = new QAction(name, this);
|
||||
if ( idx.data(ProfileModel::DATA_IS_DEFAULT).toBool() )
|
||||
addAction(pa);
|
||||
else if ( idx.data(ProfileModel::DATA_IS_GLOBAL).toBool() )
|
||||
|
@ -91,7 +91,7 @@ QAction * CopyFromProfileMenu::systemDefault(QString filename)
|
|||
QString path = dataDir.filePath(filename);
|
||||
if ( QFile::exists(path) )
|
||||
{
|
||||
data = new QAction(tr("System default"));
|
||||
data = new QAction(tr("System default"), this);
|
||||
data->setData(path);
|
||||
QFont font = data->font();
|
||||
font.setItalic(true);
|
||||
|
|
Loading…
Reference in New Issue