mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Use QGuiApplication::applicationDisplayName()
Same result with less code.
This commit is contained in:
parent
b9d6a97711
commit
974b2499c4
|
@ -48,7 +48,6 @@
|
|||
#include <KActionMenu>
|
||||
#include <KAuthorized>
|
||||
#include <KConfig>
|
||||
#include <KDesktopFile>
|
||||
#include <KFileItemListProperties>
|
||||
#include <KFilePlacesModel>
|
||||
#include <KHelpMenu>
|
||||
|
@ -403,8 +402,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event)
|
|||
dialog->setWindowTitle(i18nc("@title:window", "Confirmation"));
|
||||
dialog->setModal(true);
|
||||
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Yes | QDialogButtonBox::No | QDialogButtonBox::Cancel);
|
||||
KDesktopFile dolphinDesktopFile(QStringLiteral("%1.desktop").arg(QGuiApplication::desktopFileName()));
|
||||
KGuiItem::assign(buttons->button(QDialogButtonBox::Yes), KGuiItem(i18nc("@action:button 'Quit Dolphin' button", "&Quit %1", dolphinDesktopFile.readName()), QIcon::fromTheme(QStringLiteral("application-exit"))));
|
||||
KGuiItem::assign(buttons->button(QDialogButtonBox::Yes), KGuiItem(i18nc("@action:button 'Quit Dolphin' button", "&Quit %1", QGuiApplication::applicationDisplayName()), QIcon::fromTheme(QStringLiteral("application-exit"))));
|
||||
KGuiItem::assign(buttons->button(QDialogButtonBox::No), KGuiItem(i18n("C&lose Current Tab"), QIcon::fromTheme(QStringLiteral("tab-close"))));
|
||||
KGuiItem::assign(buttons->button(QDialogButtonBox::Cancel), KStandardGuiItem::cancel());
|
||||
buttons->button(QDialogButtonBox::Yes)->setDefault(true);
|
||||
|
|
Loading…
Reference in a new issue