Commit 51e8d9af authored by Christoph Cullmann's avatar Christoph Cullmann

KWrite starts up and doesn't find the katepart :P

parent c2cc65f6
......@@ -80,12 +80,12 @@ ecm_optional_add_subdirectory (ktexteditor)
# kate part
ecm_optional_add_subdirectory (part)
# kwrite
ecm_optional_add_subdirectory (kwrite)
# kate application
#macro_optional_add_subdirectory (kate)
# kwrite
#macro_optional_add_subdirectory (kwrite)
# addons, e.g. ktexteditor plugins, kate plugins, plasma applets, ...
#macro_optional_add_subdirectory (addons)
......
......@@ -2,8 +2,10 @@ set(kwrite_KDEINIT_SRCS kwritemain.cpp kwriteapp.cpp)
kde4_add_app_icon(kwrite_KDEINIT_SRCS "${KDE4_INSTALL_DIR}/share/icons/oxygen/*/apps/accessories-text-editor.png")
kde4_add_kdeinit_executable(kwrite ${kwrite_KDEINIT_SRCS})
target_link_libraries(kdeinit_kwrite ${KDE4_KTEXTEDITOR_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KPARTS_LIBS} ${KACTIVITIES_LIBRARY})
kf5_add_kdeinit_executable(kwrite ${kwrite_KDEINIT_SRCS})
target_link_libraries(kdeinit_kwrite ktexteditor
KF5::KParts
KF5::KDE4Support)
install(TARGETS kwrite ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS kdeinit_kwrite ${INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -26,8 +26,10 @@ Boston, MA 02110-1301, USA.
#include <QFileInfo>
#include <QTextCodec>
KWriteApp::KWriteApp(KCmdLineArgs *m_args)
: KApplication ()
#include <KGlobal>
KWriteApp::KWriteApp(int & argc, char ** argv)
: QApplication (argc, argv)
, m_args(m_args)
{
m_editor = KTextEditor::EditorChooser::editor();
......@@ -57,11 +59,13 @@ KWriteApp::~KWriteApp()
KWriteApp *KWriteApp::self ()
{
return static_cast<KWriteApp *>(kapp);
return static_cast<KWriteApp *>(QApplication::instance());
}
void KWriteApp::init()
{
#if 0 // FIXME KF5
if (isSessionRestored())
{
KWrite::restore();
......@@ -148,7 +152,7 @@ void KWriteApp::init()
if (!docs_opened) kapp->exit(1); // see http://bugs.kde.org/show_bug.cgi?id=124708
}
}
#endif
// no window there, uh, ohh, for example borked session config !!!
// create at least one !!
if (KWrite::noWindows())
......
......@@ -21,7 +21,7 @@ Boston, MA 02110-1301, USA.
#include "kwritemain.h"
#include <KApplication>
#include <QApplication>
#include <ktexteditor/editor.h>
#include <ktexteditor/containerinterface.h>
......@@ -39,7 +39,7 @@ class KCmdLineArgs;
* This class represents the core kwrite application object
*/
class KWriteApp
: public KApplication
: public QApplication
, public KTextEditor::MdiContainer
{
Q_OBJECT
......@@ -53,7 +53,7 @@ class KWriteApp
* application constructor
* @param args parsed command line args
*/
KWriteApp(KCmdLineArgs *args);
KWriteApp(int & argc, char ** argv);
/**
* application destructor
......
This diff is collapsed.
......@@ -52,7 +52,7 @@ class KWrite : public KParts::MainWindow
KWrite(KTextEditor::Document * = 0L);
~KWrite();
void loadURL(const KUrl &url);
void loadURL(const QUrl &url);
KTextEditor::View *view() const { return m_view; }
......@@ -71,7 +71,7 @@ class KWrite : public KParts::MainWindow
void slotNew();
void slotFlush ();
void slotOpen();
void slotOpen( const KUrl& url);
void slotOpen( const QUrl& url);
void newView();
void toggleStatusBar();
void editKeys();
......
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