~mrp/aerodramus

8c750c6e3ed6146f658c669447e1533a2cdbcc1f — Mark Penner 5 months ago 81f69d7
minor refactoring
2 files changed, 3 insertions(+), 7 deletions(-)

M src/MainWindow.cpp
M src/aerodramusui.rc
M src/MainWindow.cpp => src/MainWindow.cpp +2 -6
@@ 37,15 37,11 @@ void MainWindow::setupActions()
    KStandardAction::open(this, &MainWindow::openFile, actionCollection());
    KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection());

    QAction *addCalcPageAction = new QAction(this);
    addCalcPageAction->setText(i18n("&Add Calculator"));
    addCalcPageAction->setIcon(QIcon::fromTheme(u"accessories-calculator"_s));
    QAction *addCalcPageAction = new QAction(QIcon::fromTheme(u"accessories-calculator"_s), i18n("&Add Calculator"), this);
    actionCollection()->addAction(u"addCalcPage"_s, addCalcPageAction);
    connect(addCalcPageAction, &QAction::triggered, this, &MainWindow::addCalcPage);

    QAction *closeCurrentPageAction = new QAction(this);
    closeCurrentPageAction->setText(i18n("&Close Page"));
    closeCurrentPageAction->setIcon(QIcon::fromTheme(u"window-close"_s));
    QAction *closeCurrentPageAction = new QAction(QIcon::fromTheme(u"window-close"_s), i18n("&Close Page"), this);
    actionCollection()->addAction(u"closeCurrentPage"_s, closeCurrentPageAction);
    connect(closeCurrentPageAction, &QAction::triggered, this, &MainWindow::closeCurrentPage);
}

M src/aerodramusui.rc => src/aerodramusui.rc +1 -1
@@ 1,5 1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<gui name="texteditor"
<gui name="aerodramus"
     version="1"
     xmlns="http://www.kde.org/standards/kxmlgui/1.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"