Commit 670a9e06 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

move more shared code to the lib

init KCrash there
set the the right style for Windows/macOS
parent 3b7e05ac
Pipeline #158419 passed with stage
in 4 minutes and 37 seconds
......@@ -13,7 +13,6 @@
#include "katewaiter.h"
#include <KAboutData>
#include <KCrash>
#include <KDBusService>
#include <KLocalizedString>
#include <KStartupInfo>
......@@ -102,24 +101,11 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
#endif
/**
* For Windows and macOS: use Breeze if available
* Of all tested styles that works the best for us
*/
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
QApplication::setStyle(QStringLiteral("breeze"));
#endif
/**
* Enforce application name even if the executable is renamed
*/
app.setApplicationName(QStringLiteral("kate"));
/**
* Enable crash handling through KCrash.
*/
KCrash::initialize();
/**
* Connect application with translation catalogs
*/
......
......@@ -10,7 +10,6 @@
#include "kateapp.h"
#include <KAboutData>
#include <KCrash>
#include <KDBusService>
#include <KLocalizedString>
......@@ -74,19 +73,6 @@ extern "C" Q_DECL_EXPORT int main(int argc, char **argv)
QApplication app(argc, argv);
app.setApplicationName(QStringLiteral("kwrite"));
/**
* For Windows and macOS: use Breeze if available
* Of all tested styles that works the best for us
*/
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
QApplication::setStyle(QStringLiteral("breeze"));
#endif
/**
* Enable crash handling through KCrash.
*/
KCrash::initialize();
/**
* Connect application with translation catalogs
*/
......
......@@ -14,6 +14,7 @@
#include <KAboutData>
#include <KConfigGroup>
#include <KConfigGui>
#include <KCrash>
#include <KLocalizedString>
#include <KMessageBox>
#include <KNetworkMounts>
......@@ -64,6 +65,19 @@ KateApp::KateApp(const QCommandLineParser &args, const ApplicationMode mode)
+ (isKate() ? QStringLiteral("/kate/sessions") : QStringLiteral("/kwrite/sessions")))
, m_stashManager(this)
{
/**
* For Windows and macOS: use Breeze if available
* Of all tested styles that works the best for us
*/
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
QApplication::setStyle(QStringLiteral("breeze"));
#endif
/**
* Enable crash handling through KCrash.
*/
KCrash::initialize();
/**
* re-route some signals to application wrapper
*/
......
Supports Markdown
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