Commit 38277e95 authored by Claudio Cambra's avatar Claudio Cambra Committed by Carl Schwan
Browse files

Update CMakeLists.txt with references to 'texteditor' instead of...

Update CMakeLists.txt with references to 'texteditor' instead of 'usingactions' bringing it in line with the tutorial text
parent 81321c2d
......@@ -37,7 +37,7 @@ void MainWindow::setupActions()
KStandardAction::saveAs(this, &MainWindow::saveFileAs, actionCollection());
KStandardAction::openNew(this, &MainWindow::newFile, actionCollection());
setupGUI(Default, "savingloadingui.rc");
setupGUI(Default, "texteditorui.rc");
}
void MainWindow::newFile()
......
......@@ -33,9 +33,9 @@ We also want to keep track of the filename of the currently opened file so we de
We'll get into the details of mainwindow.cpp in a while.
### savingloadingui.rc
### texteditorui.rc
This is identical to usingactionsui.rc from the [previous tutorial](../using_actions) except the name has changed to 'savingloading'. We do not need to add any information about any of the [KStandardAction](docs:kconfigwidgets;KStandardAction) since the placement of those actions is handled automatically by XMLGUI system.
This is identical to texteditorui.rc from the [previous tutorial](../using_actions). We do not need to add any information about any of the [KStandardAction](docs:kconfigwidgets;KStandardAction) since the placement of those actions is handled automatically by XMLGUI system.
## Explanation
......@@ -192,5 +192,5 @@ mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local-kde
make install
source prefix.sh # located in the build directory
savingloading
texteditor
```
......@@ -37,7 +37,7 @@ void MainWindow::setupActions()
KStandardAction::saveAs(this, &MainWindow::saveFileAs, actionCollection());
KStandardAction::openNew(this, &MainWindow::newFile, actionCollection());
setupGUI(Default, "savingloadingui.rc");
setupGUI(Default, "texteditorui.rc");
}
void MainWindow::newFile()
......
cmake_minimum_required(VERSION 3.0)
project(usingactions)
project(texteditor)
set(QT_MIN_VERSION "5.11.0")
set(KF5_MIN_VERSION "5.68.0")
......@@ -29,11 +29,11 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
set(usingactions_SRCS main.cpp mainwindow.cpp)
set(texteditor_SRCS main.cpp mainwindow.cpp)
add_executable(usingactions ${usingactions_SRCS})
add_executable(texteditor ${texteditor_SRCS})
target_link_libraries(usingactions
target_link_libraries(texteditor
Qt5::Widgets
KF5::CoreAddons
KF5::I18n
......@@ -42,5 +42,5 @@ target_link_libraries(usingactions
KF5::ConfigWidgets
)
install(TARGETS usingactions ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES usingactionsui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/usingactions)
install(TARGETS texteditor ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES texteditorui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/texteditor)
......@@ -27,5 +27,5 @@ void MainWindow::setupActions()
KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection());
setupGUI(Default, "usingactionsui.rc");
setupGUI(Default, "texteditorui.rc");
}
<?xml version="1.0" encoding="UTF-8"?>
<gui name="usingactions"
version="1"
xmlns="http://www.kde.org/standards/kxmlgui/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kxmlgui/1.0
http://www.kde.org/standards/kxmlgui/1.0/kxmlgui.xsd" >
<MenuBar>
<Menu name="file" >
<Action name="clear" />
</Menu>
<Menu >
<text>A&amp;nother Menu</text>
<Action name="clear" />
</Menu >
</MenuBar>
<ToolBar name="mainToolBar" >
<text>Main Toolbar</text>
<Action name="clear" />
</ToolBar>
</gui>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment