Commit 85ffd5e9 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

add user feedback config page

parent 8d30b98c
......@@ -50,9 +50,9 @@ endif()
# optional KUserFeedback integration
find_package(KUserFeedback)
if (TARGET KUserFeedbackCore)
target_link_libraries(kate-lib PUBLIC KUserFeedbackCore)
target_compile_definitions(kate-lib PUBLIC -DWITH_KUSERFEEDBACKCORE)
if (TARGET KUserFeedbackWidgets)
target_link_libraries(kate-lib PUBLIC KUserFeedbackWidgets)
target_compile_definitions(kate-lib PUBLIC -DWITH_KUSERFEEDBACK)
endif()
ki18n_wrap_ui(UI_SOURCES ui/sessionconfigwidget.ui session/katesessionmanagedialog.ui)
......
......@@ -32,7 +32,7 @@
#include <KWindowInfo>
#include <kwindowsystem_version.h>
#ifdef WITH_KUSERFEEDBACKCORE
#ifdef WITH_KUSERFEEDBACK
#include <KUserFeedback/ApplicationVersionSource>
#include <KUserFeedback/PlatformInfoSource>
#include <KUserFeedback/ScreenInfoSource>
......@@ -76,7 +76,7 @@ KateApp::KateApp(const QCommandLineParser &args)
*/
qApp->installEventFilter(this);
#ifdef WITH_KUSERFEEDBACKCORE
#ifdef WITH_KUSERFEEDBACK
/**
* defaults, inspired by plasma
*/
......
......@@ -24,7 +24,7 @@
#include <ktexteditor/application.h>
#ifdef WITH_KUSERFEEDBACKCORE
#ifdef WITH_KUSERFEEDBACK
#include <KUserFeedback/Provider>
#endif
......@@ -89,7 +89,7 @@ public:
return &m_wrapper;
}
#ifdef WITH_KUSERFEEDBACKCORE
#ifdef WITH_KUSERFEEDBACK
/**
* Get our global user feedback provider
* @return user feedback provider
......@@ -396,7 +396,7 @@ private:
*/
KateSessionManager m_sessionManager;
#ifdef WITH_KUSERFEEDBACKCORE
#ifdef WITH_KUSERFEEDBACK
/**
* user feedback provider
*/
......
......@@ -233,6 +233,23 @@ KateConfigDialog::KateConfigDialog(KateMainWindow *parent, KTextEditor::View *vi
}
// END Plugins page
#ifdef WITH_KUSERFEEDBACK
// KUserFeedback Config
page = new QFrame(this);
vlayout = new QVBoxLayout(page);
vlayout->setContentsMargins(0, 0, 0, 0);
vlayout->setSpacing(0);
m_userFeedbackWidget = new KUserFeedback::FeedbackConfigWidget(page);
m_userFeedbackWidget->setFeedbackProvider(&KateApp::self()->userFeedbackProvider());
connect(m_userFeedbackWidget, &KUserFeedback::FeedbackConfigWidget::configurationChanged, this, &KateConfigDialog::slotChanged);
vlayout->addWidget(m_userFeedbackWidget);
item = addSubPage(applicationItem, page, i18n("User Feedback"));
item->setHeader(i18n("User Feedback"));
item->setIcon(QIcon::fromTheme(QStringLiteral("preferences-desktop-locale")));
#endif
// editor widgets from kwrite/kwdialog
m_editorPage = addPage(new QWidget, i18n("Editor Component"));
m_editorPage->setIcon(QIcon::fromTheme(QStringLiteral("accessories-text-editor")));
......
......@@ -31,6 +31,10 @@
#include <KPageDialog>
#ifdef WITH_KUSERFEEDBACK
#include <KUserFeedback/FeedbackConfigWidget>
#endif
class QCheckBox;
class QComboBox;
class QSpinBox;
......@@ -102,6 +106,10 @@ private:
KPageWidgetItem *m_editorPage;
void addEditorPages();
#ifdef WITH_KUSERFEEDBACK
KUserFeedback::FeedbackConfigWidget *m_userFeedbackWidget = nullptr;
#endif
};
#endif
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