Moved ProfileDialog from heap to stack
This commit is contained in:
@@ -33,7 +33,9 @@ ProfilePlugin::ProfilePlugin(QObject *parent) :
|
||||
|
||||
void ProfilePlugin::attachTo(MainWindow &mainWindow)
|
||||
{
|
||||
auto dialog = new ProfileDialog(mainWindow.userInfo(), &mainWindow);
|
||||
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>
|
||||
<name>ProfilePlugin</name>
|
||||
<message>
|
||||
<location filename="../profileplugin.cpp" line="38"/>
|
||||
<location filename="../profileplugin.cpp" line="37"/>
|
||||
<source>My profile</source>
|
||||
<translation>Mein Profil</translation>
|
||||
</message>
|
||||
|
@@ -97,7 +97,7 @@
|
||||
<context>
|
||||
<name>ProfilePlugin</name>
|
||||
<message>
|
||||
<location filename="../profileplugin.cpp" line="38"/>
|
||||
<location filename="../profileplugin.cpp" line="37"/>
|
||||
<source>My profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
Reference in New Issue
Block a user