Commit c2cc65f6 authored by Christoph Cullmann's avatar Christoph Cullmann

part compiles and links

parent 4ce09ae3
......@@ -228,10 +228,10 @@ kde4_add_ui_files(katepart_PART_SRCS ${katepart_PART_UI} )
add_library (katepartinterfaces SHARED ${katepart_PART_SRCS} )
target_link_libraries (katepartinterfaces
target_link_libraries (katepartinterfaces ktexteditor
KF5::KParts
KF5::KDE4Support
KF5::KNewStuff Qt5::Script
KF5::KNewStuff Qt5::Script KF5::SonnetCore KF5::KArchive KF5::KCMUtils KF5::KPrintUtils KF5::ItemViews
)
set_target_properties(
......@@ -247,10 +247,10 @@ install (TARGETS katepartinterfaces EXPORT kdelibsLibraryTargets ${INSTALL_TARGE
kde4_add_plugin (katepart utils/katefactory.cpp)
# link the part, use kate part interfaces + kde stuff
target_link_libraries (katepart katepartinterfaces
target_link_libraries (katepart katepartinterfaces ktexteditor
KF5::KParts
KF5::KDE4Support
KF5::KNewStuff)
KF5::KNewStuff Qt5::Script KF5::SonnetCore KF5::KArchive KF5::KCMUtils KF5::KPrintUtils KF5::ItemViews)
# install the part
install (TARGETS katepart DESTINATION ${PLUGIN_INSTALL_DIR})
......
......@@ -28,8 +28,8 @@
KateCategoryDrawer::KateCategoryDrawer() : KCategoryDrawerV3 (0)
{
setLeftMargin( 7 );
setRightMargin( 7 );
//FIXME KF5 setLeftMargin( 7 );
//FIXME KF5 setRightMargin( 7 );
}
void KateCategoryDrawer::drawCategory(const QModelIndex &index,
......
......@@ -21,14 +21,17 @@
#include "katecategorydrawer.h"
#include <QtWidgets/QStyledItemDelegate>
#include <QtWidgets/QPainter>
#include <QtGui/QPainter>
#include <QtWidgets/QHeaderView>
#include <klocale.h>
#include <kconfiggroup.h>
#include <klocalizedstring.h>
#include <kdebug.h>
#include <kcolordialog.h>
#include <kcolorscheme.h>
#include <kicon.h>
#include <kiconloader.h>
#include <kcolorutils.h>
#include <QDebug>
......@@ -200,7 +203,8 @@ class KateColorTreeDelegate : public QStyledItemDelegate
opt.rect = m_tree->style()->subElementRect(QStyle::SE_PushButtonContents, &opt, m_tree);
opt.rect.adjust(1, 1, -1, -1);
painter->fillRect(opt.rect, color);
qDrawShadePanel(painter, opt.rect, opt.palette, true, 1, NULL);
//FIXME KF5 qDrawShadePanel(painter, opt.rect, opt.palette, true, 1, NULL);
}
//END: draw color button
......
......@@ -40,6 +40,9 @@
#include <kmessagebox.h>
#include <khbox.h>
#include <ktabwidget.h>
#include <kcombobox.h>
#include <kglobal.h>
#include <KGlobalSettings>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QProgressDialog>
......@@ -781,7 +784,7 @@ void KateSchemaConfigHighlightTab::importHl(const QString& fromSchemaName, QStri
if (schema.isEmpty()) schema=m_schema;
if (doManage) {
QString srcName=KFileDialog::getOpenFileName( QString(KateHlManager::self()->getHl(hl)->name()+QString(".katehlcolor")),
QString srcName=KFileDialog::getOpenFileName( QUrl(KateHlManager::self()->getHl(hl)->name()+QString(".katehlcolor")),
QString::fromLatin1("*.katehlcolor|%1").arg(i18n("Kate color schema")),
this,
i18n("Importing colors for single highlighting"));
......@@ -846,7 +849,7 @@ void KateSchemaConfigHighlightTab::exportHl(QString schema, int hl, KConfig *cfg
QList<KateExtendedAttribute::Ptr> items=m_hlDict[schema][hl];
if (doManage) {
QString destName=KFileDialog::getSaveFileName( QString(KateHlManager::self()->getHl(hl)->name()+".katehlcolor"),
QString destName=KFileDialog::getSaveFileName( QUrl(KateHlManager::self()->getHl(hl)->name()+".katehlcolor"),
QString::fromLatin1("*.katehlcolor|%1").arg(i18n("Kate color schema")),
this,
i18n("Exporting colors for single highlighting: %1", KateHlManager::self()->getHl(hl)->name()),
......@@ -934,7 +937,7 @@ KateSchemaConfigPage::KateSchemaConfigPage( QWidget *parent)
hbHl = new KHBox( this );
layout->addWidget (hbHl);
hbHl->setSpacing( -1 );
lHl = new QLabel( i18n("&Default schema for %1:", KGlobal::mainComponent().aboutData()->programName ()), hbHl );
lHl = new QLabel( i18n("&Default schema for %1:", QString() /* FIXME KF5 KGlobal::mainComponent().aboutData()->programName ()*/), hbHl );
defaultSchemaCombo = new KComboBox( hbHl );
defaultSchemaCombo->setEditable( false );
lHl->setBuddy( defaultSchemaCombo );
......@@ -954,7 +957,7 @@ void KateSchemaConfigPage::exportFullSchema()
// get save destination
const QString currentSchemaName = m_currentSchema;
QString destName = KFileDialog::getSaveFileName(
QString(currentSchemaName + ".kateschema"),
QUrl(currentSchemaName + ".kateschema"),
QString::fromLatin1("*.kateschema|%1").arg(i18n("Kate color schema")),
this,
i18n("Exporting color schema: %1", currentSchemaName),
......@@ -1057,7 +1060,7 @@ QString KateSchemaConfigPage::requestSchemaName(const QString& suggestedName)
void KateSchemaConfigPage::importFullSchema()
{
const QString srcName = KFileDialog::getOpenFileName(KUrl(),
const QString srcName = KFileDialog::getOpenFileName(QUrl(),
QString::fromLatin1("*.kateschema|%1").arg(i18n("Kate color schema")),
this, i18n("Importing Color Schema"));
......
......@@ -21,13 +21,14 @@
#include "katestyletreewidget.h"
#include <QtWidgets/QPainter>
#include <QtWidgets/QKeyEvent>
#include <QtGui/QPainter>
#include <QtGui/QKeyEvent>
#include <QtWidgets/QAction>
#include <QtWidgets/QStyledItemDelegate>
#include <QtWidgets/QHeaderView>
#include <klocale.h>
#include <klocalizedstring.h>
#include <kicon.h>
#include <kcolorscheme.h>
#include <kmenu.h>
......
......@@ -33,6 +33,8 @@
#include <KPushButton>
#include <KAction>
#include <KMimeTypeTrader>
#include <KIcon>
#include <KShortcut>
#include <KTextEditor/Document>
#include <KTextEditor/View>
#include <KToolInvocation>
......@@ -198,12 +200,12 @@ void EditSnippet::save()
void EditSnippet::slotSnippetDocumentation()
{
KToolInvocation::invokeHelp("kate-application-plugin-snippets", "kate");
//FIXME KF5 KToolInvocation::invokeHelp("kate-application-plugin-snippets", "kate");
}
void EditSnippet::slotScriptDocumentation()
{
KToolInvocation::invokeHelp("dev-scripting-api", "kate");
//FIXME KF5 KToolInvocation::invokeHelp("dev-scripting-api", "kate");
}
void EditSnippet::reject()
......
......@@ -121,7 +121,7 @@ void SnippetCompletionModel::initData(KTextEditor::View* view)
QModelIndex SnippetCompletionModel::parent(const QModelIndex& index) const {
if (index.internalId()) {
return createIndex(0, 0, 0);
return createIndex(0, 0, quintptr (0));
} else {
return QModelIndex();
}
......@@ -130,7 +130,7 @@ QModelIndex SnippetCompletionModel::parent(const QModelIndex& index) const {
QModelIndex SnippetCompletionModel::index(int row, int column, const QModelIndex& parent) const {
if (!parent.isValid()) {
if (row == 0) {
return createIndex(row, column, 0); //header index
return createIndex(row, column, quintptr (0)); //header index
} else {
return QModelIndex();
}
......
......@@ -31,6 +31,7 @@
#include <KIcon>
#include <KDebug>
#include <KGlobal>
#include <QDomDocument>
#include <QDomElement>
......@@ -276,7 +277,7 @@ void SnippetRepository::slotParseFile()
if (!success) {
KMessageBox::error( QApplication::activeWindow(),
i18n("<qt>The error <b>%4</b><br /> has been detected in the file %1 at %2/%3</qt>",
m_file, line, col, i18nc("QXml", errorMsg.toUtf8())) );
m_file, line, col, i18nc("QXml", errorMsg.toUtf8().data())) );
return;
}
......
......@@ -28,6 +28,7 @@
#include <KStandardDirs>
#include <KDebug>
#include <KGlobal>
#include <ktexteditor/editor.h>
#include <ktexteditor/templateinterface2.h>
......
......@@ -317,7 +317,7 @@ void SnippetView::slotSnippetToGHNS()
return;
KNS3::UploadDialog dialog("ktexteditor_codesnippets_core.knsrc", this);
dialog.setUploadFile(KUrl::fromPath(repo->file()));
dialog.setUploadFile(QUrl::fromLocalFile(repo->file()));
dialog.setUploadName(repo->text());
dialog.exec();
}
......
......@@ -26,6 +26,7 @@
#include <kmessagebox.h>
#include <krun.h>
#include <klocale.h>
#include <klocalizedstring.h>
//BEGIN SwapDiffCreator
SwapDiffCreator::SwapDiffCreator(Kate::SwapFile* swapFile)
......@@ -152,7 +153,7 @@ void SwapDiffCreator::slotDiffFinished()
m_diffFile.setAutoRemove (false);
// KRun::runUrl should delete the file, once the client exits
KRun::runUrl (KUrl::fromPath(m_diffFile.fileName()), "text/x-patch", m_swapFile->document()->activeView(), true );
KRun::runUrl (QUrl::fromLocalFile(m_diffFile.fileName()), "text/x-patch", m_swapFile->document()->activeView(), true );
deleteLater();
}
......
......@@ -31,6 +31,7 @@
#include <kde_file.h>
#include <klocale.h>
#include <kicon.h>
#include <klocalizedstring.h>
#include <kstandardguiitem.h>
#include <QFileInfo>
......@@ -560,7 +561,7 @@ bool SwapFile::updateFileName()
QString SwapFile::fileName()
{
const KUrl &url = m_document->url();
const QUrl &url = m_document->url();
if (url.isEmpty() || !url.isLocalFile())
return QString();
......
......@@ -2216,23 +2216,6 @@ void KateIconBorder::annotationModelChanged( KTextEditor::AnnotationModel * oldm
// the default/unknown mib value is 2.
#define MIB_DEFAULT 2
class KateViewEncodingAction::Private
{
public:
Private(KateViewEncodingAction *parent)
: q(parent),
currentSubAction(0)
{
}
void init();
void _k_subActionTriggered(QAction*);
KateViewEncodingAction *q;
QAction *currentSubAction;
};
bool lessThanAction(KSelectAction *a, KSelectAction *b)
{
return a->text() < b->text();
......
......@@ -274,7 +274,24 @@ class KateViewEncodingAction: public KSelectAction
private:
KateDocument* doc;
KateView *view;
class Private;
class Private
{
public:
Private(KateViewEncodingAction *parent)
: q(parent),
currentSubAction(0)
{
}
void init();
void _k_subActionTriggered(QAction*);
KateViewEncodingAction *q;
QAction *currentSubAction;
};
Private* const d;
Q_PRIVATE_SLOT( d, void _k_subActionTriggered(QAction*) )
......
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