Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Remove Base suffix from UI class names in templates

parent 961f20a5
......@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef %{APPNAMEUC}VIEW_H
#define %{APPNAMEUC}VIEW_H
#include "ui_%{APPNAMELC}ViewBase.h"
#include "ui_%{APPNAMELC}view.h"
/**
......@@ -53,7 +53,7 @@ public Q_SLOTS:
private:
// this is the name of the root widget inside our Ui file
// you can rename it in designer and then change it here
Ui::%{APPNAMELC}ViewBase m_ui;
Ui::%{APPNAME}View m_ui;
};
#endif // %{APPNAMEUC}VIEW_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>%{APPNAMELC}ViewBase</class>
<widget class="QWidget" name="%{APPNAMELC}ViewBase">
<class>%{APPNAME}View</class>
<widget class="QWidget" name="%{APPNAME}View">
<property name="geometry">
<rect>
<x>0</x>
......
......@@ -72,7 +72,7 @@ void %{APPNAME}Window::settingsConfigure()
KConfigDialog *dialog = new KConfigDialog(this, QStringLiteral("settings"), %{APPNAME}Settings::self());
QWidget *generalSettingsPage = new QWidget;
settingsBase.setupUi(generalSettingsPage);
m_settings.setupUi(generalSettingsPage);
dialog->addPage(generalSettingsPage, i18n("General"), QStringLiteral("package_setting"));
connect(dialog, &KConfigDialog::settingsChanged, m_%{APPNAMELC}View, &%{APPNAME}View::handleSettingsChanged);
dialog->setAttribute(Qt::WA_DeleteOnClose);
......
......@@ -23,8 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KXmlGuiWindow>
#include "ui_%{APPNAMELC}ViewBase.h"
#include "ui_settingsBase.h"
#include "ui_%{APPNAMELC}view.h"
#include "ui_settings.h"
#include "%{APPNAME}Settings.h"
class %{APPNAME}View;
......@@ -65,8 +65,7 @@ private Q_SLOTS:
private:
// this is the name of the root widget inside our Ui file
// you can rename it in designer and then change it here
Ui::settingsBase settingsBase;
Ui::%{APPNAMELC}ViewBase %{APPNAMELC}ViewBase;
Ui::Settings m_settings;
QAction *m_switchAction;
%{APPNAME}View *m_%{APPNAMELC}View;
};
......
......@@ -11,8 +11,8 @@ ecm_qt_declare_logging_category(%{APPNAMELC}_SRCS
)
kconfig_add_kcfg_files(%{APPNAMELC}_SRCS %{APPNAME}Settings.kcfgc)
ki18n_wrap_ui(%{APPNAMELC}_SRCS
%{APPNAMELC}ViewBase.ui
settingsBase.ui
%{APPNAMELC}view.ui
settings.ui
)
add_executable(%{APPNAMELC} ${%{APPNAMELC}_SRCS})
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>settingsBase</class>
<widget class="QWidget" name="settingsBase">
<class>Settings</class>
<widget class="QWidget" name="Settings">
<property name="geometry">
<rect>
<x>0</x>
......
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