Moved ProfileDialog from heap to stack
This commit is contained in:
@@ -33,7 +33,9 @@ ProfilePlugin::ProfilePlugin(QObject *parent) :
|
|||||||
|
|
||||||
void ProfilePlugin::attachTo(MainWindow &mainWindow)
|
void ProfilePlugin::attachTo(MainWindow &mainWindow)
|
||||||
{
|
{
|
||||||
auto dialog = new ProfileDialog(mainWindow.userInfo(), &mainWindow);
|
|
||||||
mainWindow.menuTools()->addAction(QIcon(QStringLiteral(":/zeiterfassung/plugins/profileplugin/images/profile.png")),
|
mainWindow.menuTools()->addAction(QIcon(QStringLiteral(":/zeiterfassung/plugins/profileplugin/images/profile.png")),
|
||||||
tr("My profile"), dialog, &QDialog::open);
|
tr("My profile"), &mainWindow, [&mainWindow](){
|
||||||
|
ProfileDialog dialog(mainWindow.userInfo(), &mainWindow);
|
||||||
|
dialog.exec();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@@ -97,7 +97,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ProfilePlugin</name>
|
<name>ProfilePlugin</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../profileplugin.cpp" line="38"/>
|
<location filename="../profileplugin.cpp" line="37"/>
|
||||||
<source>My profile</source>
|
<source>My profile</source>
|
||||||
<translation>Mein Profil</translation>
|
<translation>Mein Profil</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@@ -97,7 +97,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ProfilePlugin</name>
|
<name>ProfilePlugin</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../profileplugin.cpp" line="38"/>
|
<location filename="../profileplugin.cpp" line="37"/>
|
||||||
<source>My profile</source>
|
<source>My profile</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
Reference in New Issue
Block a user