[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [cantor/frameworks] /: Remove kdelibs4supports. Remove not necessary includes moc etc.
From: Montel Laurent <montel () kde ! org>
Date: 2014-10-31 22:02:18
Message-ID: E1XkKGw-0000er-JB () scm ! kde ! org
[Download RAW message or body]
Git commit 2ad2f622e4eda494812f150c7579ae43891d0539 by Montel Laurent.
Committed on 31/10/2014 at 22:02.
Pushed by mlaurent into branch 'frameworks'.
Remove kdelibs4supports. Remove not necessary includes moc etc.
M +2 -2 CMakeLists.txt
M +1 -1 src/animation.cpp
M +2 -2 src/animationresultitem.cpp
M +1 -1 src/animationresultitem.h
M +1 -1 src/assistants/linearalgebra/creatematrix/creatematrixdlg.cpp
M +2 -2 src/backendchoosedialog.cpp
M +1 -1 src/backends/qalculate/qalculateexpression.cpp
M +1 -1 src/backends/qalculate/qalculatehighlighter.cpp
M +4 -3 src/cantor.cpp
M +1 -1 src/commandentry.cpp
M +1 -1 src/commandentry.h
M +3 -3 src/imageentry.cpp
M +1 -1 src/imageentry.h
M +2 -2 src/imageresultitem.cpp
M +1 -1 src/imageresultitem.h
M +1 -1 src/latexentry.cpp
M +1 -1 src/latexentry.h
M +1 -1 src/lib/completionobject.cpp
M +1 -1 src/lib/defaulthighlighter.cpp
M +1 -1 src/lib/defaultvariablemodel.cpp
M +1 -1 src/lib/expression.cpp
M +1 -1 src/lib/latexrenderer.cpp
M +1 -1 src/lib/panelplugin.cpp
M +1 -1 src/lib/panelpluginhandler.cpp
M +1 -1 src/lib/session.cpp
M +1 -1 src/lib/test/backendtest.cpp
M +2 -2 src/pagebreakentry.cpp
M +1 -1 src/pagebreakentry.h
M +1 -1 src/panelplugins/helppanel/helppanelplugin.cpp
M +1 -1 src/panelplugins/variablemgr/variablemanagerplugin.cpp
M +1 -1 src/panelplugins/variablemgr/variablemanagerwidget.cpp
M +1 -1 src/resultitem.cpp
M +3 -3 src/resultitem.h
M +2 -2 src/scripteditorwidget.cpp
M +5 -5 src/searchbar.cpp
M +2 -2 src/searchbar.h
M +1 -1 src/textentry.cpp
M +1 -1 src/textentry.h
M +2 -2 src/textresultitem.cpp
M +1 -1 src/textresultitem.h
M +7 -7 src/worksheet.cpp
M +3 -3 src/worksheet.h
M +3 -3 src/worksheetentry.cpp
M +1 -1 src/worksheetentry.h
M +6 -6 src/worksheetimageitem.cpp
M +3 -3 src/worksheetimageitem.h
M +7 -6 src/worksheettextitem.cpp
M +3 -3 src/worksheettextitem.h
M +1 -1 src/worksheetview.cpp
http://commits.kde.org/cantor/2ad2f622e4eda494812f150c7579ae43891d0539
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5920375..7744d47 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,7 @@ cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
add_definitions(-DMAKE_CANTORLIBS_LIB)
-find_package(ECM 1.1.0 REQUIRED CONFIG)
+find_package(ECM 1.3.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${cantor_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH} \
${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
find_package(Qt5 CONFIG REQUIRED
@@ -59,4 +59,4 @@ add_subdirectory(icons)
install(FILES cantor.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX}/appdata/)
-feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
\ No newline at end of file
+feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/src/animation.cpp b/src/animation.cpp
index 16a6c2e..38cebb5 100644
--- a/src/animation.cpp
+++ b/src/animation.cpp
@@ -110,4 +110,4 @@ QMovie* AnimationHelperItem::movie() const
return m_animation->movie();
}
-#include "animation.moc"
+
diff --git a/src/animationresultitem.cpp b/src/animationresultitem.cpp
index bce9198..11b2388 100644
--- a/src/animationresultitem.cpp
+++ b/src/animationresultitem.cpp
@@ -46,7 +46,7 @@ double AnimationResultItem::setGeometry(double x, double y, double \
w) return m_height;
}
-void AnimationResultItem::populateMenu(KMenu* menu, const QPointF& pos)
+void AnimationResultItem::populateMenu(QMenu* menu, const QPointF& pos)
{
addCommonActions(this, menu);
@@ -166,4 +166,4 @@ Cantor::Result* AnimationResultItem::result()
return parentEntry()->expression()->result();
}
-#include "animationresultitem.moc"
+
diff --git a/src/animationresultitem.h b/src/animationresultitem.h
index 0994f79..0ad458b 100644
--- a/src/animationresultitem.h
+++ b/src/animationresultitem.h
@@ -37,7 +37,7 @@ class AnimationResultItem : public WorksheetImageItem, public \
ResultItem
using WorksheetImageItem::setGeometry;
double setGeometry(double x, double y, double w);
- void populateMenu(KMenu* menu, const QPointF& pos);
+ void populateMenu(QMenu* menu, const QPointF& pos);
ResultItem* updateFromResult(Cantor::Result* result);
diff --git a/src/assistants/linearalgebra/creatematrix/creatematrixdlg.cpp \
b/src/assistants/linearalgebra/creatematrix/creatematrixdlg.cpp index \
c69e90d..9fad5cc 100644
--- a/src/assistants/linearalgebra/creatematrix/creatematrixdlg.cpp
+++ b/src/assistants/linearalgebra/creatematrix/creatematrixdlg.cpp
@@ -65,4 +65,4 @@ QString CreateMatrixDlg::value(int i, int j)
return "0";
}
-#include "creatematrixdlg.moc"
+
diff --git a/src/backendchoosedialog.cpp b/src/backendchoosedialog.cpp
index 8224772..8d8adfa 100644
--- a/src/backendchoosedialog.cpp
+++ b/src/backendchoosedialog.cpp
@@ -69,7 +69,7 @@ void BackendChooseDialog::onAccept()
if(m_ui.makeDefault->isChecked())
{
Settings::self()->setDefaultBackend(m_backend);
- Settings::self()->writeConfig();
+ Settings::self()->save();
}
}
@@ -84,4 +84,4 @@ QString BackendChooseDialog::backendName()
return m_backend;
}
-#include "backendchoosedialog.moc"
+
diff --git a/src/backends/qalculate/qalculateexpression.cpp \
b/src/backends/qalculate/qalculateexpression.cpp index ddc8e4c..5819cd9 100644
--- a/src/backends/qalculate/qalculateexpression.cpp
+++ b/src/backends/qalculate/qalculateexpression.cpp
@@ -986,7 +986,7 @@ QSharedPointer<PrintOptions> QalculateExpression::printOptions()
po->lower_case_e = true;
po->base = QalculateSettings::base();
- po->decimalpoint_sign = KGlobal::locale()->decimalSymbol().toLocal8Bit().data();
+ po->decimalpoint_sign = KLocale::global()->decimalSymbol().toLocal8Bit().data();
switch (QalculateSettings::minExp()) {
case 0:
diff --git a/src/backends/qalculate/qalculatehighlighter.cpp \
b/src/backends/qalculate/qalculatehighlighter.cpp index dd74a78..b222408 100644
--- a/src/backends/qalculate/qalculatehighlighter.cpp
+++ b/src/backends/qalculate/qalculatehighlighter.cpp
@@ -56,7 +56,7 @@ void QalculateHighlighter::highlightBlock(const QString& text)
CALCULATOR->beginTemporaryStopMessages();
- const QString decimalSymbol = KGlobal::locale()->decimalSymbol();
+ const QString decimalSymbol = KLocale::global()->decimalSymbol();
for ( int i = 0; i < words.size(); ++i, pos += count ) {
count = words[i].size();
diff --git a/src/cantor.cpp b/src/cantor.cpp
index 2323689..c8acc6d 100644
--- a/src/cantor.cpp
+++ b/src/cantor.cpp
@@ -18,7 +18,7 @@
Copyright (C) 2009 Alexander Rieder <alexanderrieder@gmail.com>
*/
#include "cantor.h"
-#include "cantor.moc"
+
#include <QAction>
#include <KActionCollection>
@@ -40,13 +40,14 @@
#include <KXMLGUIFactory>
#include <KStandardDirs>
#include <KToggleAction>
-#include <KMenu>
+#include <QMenu>
#include <KNS3/DownloadDialog>
#include <QApplication>
#include <QDebug>
#include <QDockWidget>
+#include <QDir>
#include "lib/backend.h"
#include "lib/panelpluginhandler.h"
@@ -398,7 +399,7 @@ void CantorShell::openExample()
{
QString dir = KStandardDirs::locateLocal("appdata", QLatin1String("examples"));
if (dir.isEmpty()) return;
- KStandardDirs::makeDir(dir);
+ QDir().mkpath(dir);
QStringList files=QDir(dir).entryList(QDir::Files);
QPointer<KDialog> dlg=new KDialog(this);
diff --git a/src/commandentry.cpp b/src/commandentry.cpp
index f10d4f0..c80cbd1 100644
--- a/src/commandentry.cpp
+++ b/src/commandentry.cpp
@@ -92,7 +92,7 @@ int CommandEntry::type() const
return Type;
}
-void CommandEntry::populateMenu(KMenu *menu, const QPointF& pos)
+void CommandEntry::populateMenu(QMenu *menu, const QPointF& pos)
{
qDebug() << "populate Menu";
WorksheetEntry::populateMenu(menu, pos);
diff --git a/src/commandentry.h b/src/commandentry.h
index 9bb112f..60d96d3 100644
--- a/src/commandentry.h
+++ b/src/commandentry.h
@@ -108,7 +108,7 @@ class CommandEntry : public WorksheetEntry
void moveToNextItem(int pos, qreal x);
void moveToPreviousItem(int pos, qreal x);
- void populateMenu(KMenu *menu, const QPointF& pos);
+ void populateMenu(QMenu *menu, const QPointF& pos);
protected:
bool wantToEvaluate();
diff --git a/src/imageentry.cpp b/src/imageentry.cpp
index 811c52c..f44eb89 100644
--- a/src/imageentry.cpp
+++ b/src/imageentry.cpp
@@ -23,7 +23,7 @@
#include "actionbar.h"
#include <KLocale>
-#include <KMenu>
+#include <QMenu>
#include <QDebug>
ImageEntry::ImageEntry(Worksheet* worksheet) : WorksheetEntry(worksheet)
@@ -51,7 +51,7 @@ ImageEntry::~ImageEntry()
{
}
-void ImageEntry::populateMenu(KMenu *menu, const QPointF& pos)
+void ImageEntry::populateMenu(QMenu *menu, const QPointF& pos)
{
menu->addAction(QIcon::fromTheme(QLatin1String("configure")), i18n("Configure \
Image"), this, SLOT(startConfigDialog()));
@@ -341,4 +341,4 @@ bool ImageEntry::wantFocus()
return false;
}
-#include "imageentry.moc"
+
diff --git a/src/imageentry.h b/src/imageentry.h
index 38d596f..04d0853 100644
--- a/src/imageentry.h
+++ b/src/imageentry.h
@@ -59,7 +59,7 @@ class ImageEntry : public WorksheetEntry
bool evaluate(EvaluationOption evalOp = FocusNext);
void updateEntry();
- void populateMenu(KMenu *menu, const QPointF& pos);
+ void populateMenu(QMenu *menu, const QPointF& pos);
void startConfigDialog();
void setImageData(const QString& path, const ImageSize& displaySize,
const ImageSize& printSize, bool useDisplaySizeForPrinting);
diff --git a/src/imageresultitem.cpp b/src/imageresultitem.cpp
index 69a6b43..77bc20e 100644
--- a/src/imageresultitem.cpp
+++ b/src/imageresultitem.cpp
@@ -44,7 +44,7 @@ double ImageResultItem::setGeometry(double x, double y, double w)
return height();
}
-void ImageResultItem::populateMenu(KMenu* menu, const QPointF& pos)
+void ImageResultItem::populateMenu(QMenu* menu, const QPointF& pos)
{
addCommonActions(this, menu);
@@ -111,5 +111,5 @@ Cantor::Result* ImageResultItem::result()
return parentEntry()->expression()->result();
}
-#include "imageresultitem.moc"
+
diff --git a/src/imageresultitem.h b/src/imageresultitem.h
index 9dc082a..d66738f 100644
--- a/src/imageresultitem.h
+++ b/src/imageresultitem.h
@@ -35,7 +35,7 @@ class ImageResultItem : public WorksheetImageItem, public \
ResultItem
using WorksheetImageItem::setGeometry;
double setGeometry(double x, double y, double w);
- void populateMenu(KMenu* menu, const QPointF& pos);
+ void populateMenu(QMenu* menu, const QPointF& pos);
ResultItem* updateFromResult(Cantor::Result* result);
diff --git a/src/latexentry.cpp b/src/latexentry.cpp
index 79f3eab..761638f 100644
--- a/src/latexentry.cpp
+++ b/src/latexentry.cpp
@@ -48,7 +48,7 @@ LatexEntry::~LatexEntry()
{
}
-void LatexEntry::populateMenu(KMenu *menu, const QPointF& pos)
+void LatexEntry::populateMenu(QMenu *menu, const QPointF& pos)
{
bool imageSelected = false;
QTextCursor cursor = m_textItem->textCursor();
diff --git a/src/latexentry.h b/src/latexentry.h
index 893b220..25d5e38 100644
--- a/src/latexentry.h
+++ b/src/latexentry.h
@@ -62,7 +62,7 @@ class LatexEntry : public WorksheetEntry
bool evaluate(EvaluationOption evalOp = FocusNext);
void resolveImagesAtCursor();
void updateEntry();
- void populateMenu(KMenu *menu, const QPointF& pos);
+ void populateMenu(QMenu *menu, const QPointF& pos);
protected:
bool wantToEvaluate();
diff --git a/src/lib/completionobject.cpp b/src/lib/completionobject.cpp
index 344b942..c53d2b2 100644
--- a/src/lib/completionobject.cpp
+++ b/src/lib/completionobject.cpp
@@ -292,4 +292,4 @@ void CompletionObject::completeUnknownLine()
completeVariableLine();
}
-#include "completionobject.moc"
+
diff --git a/src/lib/defaulthighlighter.cpp b/src/lib/defaulthighlighter.cpp
index 62e0257..e5c4ce3 100644
--- a/src/lib/defaulthighlighter.cpp
+++ b/src/lib/defaulthighlighter.cpp
@@ -412,4 +412,4 @@ QString DefaultHighlighter::nonSeparatingCharacters() const
return QString();
}
-#include "defaulthighlighter.moc"
+
diff --git a/src/lib/defaultvariablemodel.cpp b/src/lib/defaultvariablemodel.cpp
index f4d7f0a..ad9a310 100644
--- a/src/lib/defaultvariablemodel.cpp
+++ b/src/lib/defaultvariablemodel.cpp
@@ -198,5 +198,5 @@ bool operator==(const Cantor::DefaultVariableModel::Variable& \
one, const Cantor:
}
-#include "defaultvariablemodel.moc"
+
diff --git a/src/lib/expression.cpp b/src/lib/expression.cpp
index 5cd846d..dfc3e58 100644
--- a/src/lib/expression.cpp
+++ b/src/lib/expression.cpp
@@ -270,5 +270,5 @@ bool Expression::isInternal()
return d->isInternal;
}
-#include "expression.moc"
+
diff --git a/src/lib/latexrenderer.cpp b/src/lib/latexrenderer.cpp
index 0c68ceb..75f7cda 100644
--- a/src/lib/latexrenderer.cpp
+++ b/src/lib/latexrenderer.cpp
@@ -256,4 +256,4 @@ void LatexRenderer::renderWithMml()
emit done();
}
-#include "latexrenderer.moc"
+
diff --git a/src/lib/panelplugin.cpp b/src/lib/panelplugin.cpp
index d09b2dc..1fa61d0 100644
--- a/src/lib/panelplugin.cpp
+++ b/src/lib/panelplugin.cpp
@@ -94,4 +94,4 @@ void PanelPlugin::onSessionChanged()
}
-#include "panelplugin.moc"
+
diff --git a/src/lib/panelpluginhandler.cpp b/src/lib/panelpluginhandler.cpp
index 2d82383..8c73405 100644
--- a/src/lib/panelpluginhandler.cpp
+++ b/src/lib/panelpluginhandler.cpp
@@ -116,4 +116,4 @@ void PanelPluginHandler::addPlugin(PanelPlugin* plugin)
d->plugins.append(plugin);
}
-#include "panelpluginhandler.moc"
+
diff --git a/src/lib/session.cpp b/src/lib/session.cpp
index 73256c3..97afe3f 100644
--- a/src/lib/session.cpp
+++ b/src/lib/session.cpp
@@ -121,5 +121,5 @@ int Session::nextExpressionId()
return d->expressionCount++;
}
-#include "session.moc"
+
diff --git a/src/lib/test/backendtest.cpp b/src/lib/test/backendtest.cpp
index 00b30a0..2d81673 100644
--- a/src/lib/test/backendtest.cpp
+++ b/src/lib/test/backendtest.cpp
@@ -104,4 +104,4 @@ void BackendTest::waitForSignal(QObject* sender, const char* \
signal) }
-#include "backendtest.moc"
+
diff --git a/src/pagebreakentry.cpp b/src/pagebreakentry.cpp
index fba4577..18a51af 100644
--- a/src/pagebreakentry.cpp
+++ b/src/pagebreakentry.cpp
@@ -55,7 +55,7 @@ int PageBreakEntry::type() const
return Type;
}
-void PageBreakEntry::populateMenu(KMenu *menu, const QPointF& pos)
+void PageBreakEntry::populateMenu(QMenu *menu, const QPointF& pos)
{
WorksheetEntry::populateMenu(menu, pos);
}
@@ -153,4 +153,4 @@ bool PageBreakEntry::wantFocus()
return false;
}
-#include "pagebreakentry.moc"
+
diff --git a/src/pagebreakentry.h b/src/pagebreakentry.h
index 9faac12..dbe47ec 100644
--- a/src/pagebreakentry.h
+++ b/src/pagebreakentry.h
@@ -53,7 +53,7 @@ class PageBreakEntry : public WorksheetEntry
public Q_SLOTS:
bool evaluate(EvaluationOption evalOp = FocusNext);
void updateEntry();
- void populateMenu(KMenu *menu, const QPointF& pos);
+ void populateMenu(QMenu *menu, const QPointF& pos);
protected:
bool wantToEvaluate();
diff --git a/src/panelplugins/helppanel/helppanelplugin.cpp \
b/src/panelplugins/helppanel/helppanelplugin.cpp index f3cfc36..ca108eb 100644
--- a/src/panelplugins/helppanel/helppanelplugin.cpp
+++ b/src/panelplugins/helppanel/helppanelplugin.cpp
@@ -68,6 +68,6 @@ void HelpPanelPlugin::showHelp(const QString& help)
m_edit->setHtml(help);
}
-#include "helppanelplugin.moc"
+
K_EXPORT_CANTOR_PLUGIN(helppanelplugin, HelpPanelPlugin)
diff --git a/src/panelplugins/variablemgr/variablemanagerplugin.cpp \
b/src/panelplugins/variablemgr/variablemanagerplugin.cpp index 13c58ec..f7c3314 \
100644
--- a/src/panelplugins/variablemgr/variablemanagerplugin.cpp
+++ b/src/panelplugins/variablemgr/variablemanagerplugin.cpp
@@ -62,6 +62,6 @@ Cantor::Backend::Capabilities \
VariableManagerPlugin::requiredCapabilities() }
-#include "variablemanagerplugin.moc"
+
K_EXPORT_CANTOR_PLUGIN(variablemanagerplugin, VariableManagerPlugin)
diff --git a/src/panelplugins/variablemgr/variablemanagerwidget.cpp \
b/src/panelplugins/variablemgr/variablemanagerwidget.cpp index 0a241e9..9b2750b \
100644
--- a/src/panelplugins/variablemgr/variablemanagerwidget.cpp
+++ b/src/panelplugins/variablemgr/variablemanagerwidget.cpp
@@ -184,4 +184,4 @@ void VariableManagerWidget::newVariable()
}
-#include "variablemanagerwidget.moc"
+
diff --git a/src/resultitem.cpp b/src/resultitem.cpp
index 79582ae..013c454 100644
--- a/src/resultitem.cpp
+++ b/src/resultitem.cpp
@@ -73,7 +73,7 @@ ResultItem* ResultItem::create(WorksheetEntry* parent, \
Cantor::Result* result) }
}
-void ResultItem::addCommonActions(QObject* self, KMenu* menu)
+void ResultItem::addCommonActions(QObject* self, QMenu* menu)
{
menu->addAction(i18n("Save result"), self, SLOT(saveResult()));
menu->addAction(QIcon::fromTheme(QLatin1String("edit-delete")), i18n("Remove \
result"),
diff --git a/src/resultitem.h b/src/resultitem.h
index 9909631..56484c7 100644
--- a/src/resultitem.h
+++ b/src/resultitem.h
@@ -36,7 +36,7 @@ namespace Cantor {
class WorksheetEntry;
-class KMenu;
+class QMenu;
class QObject;
class QPointF;
class QGraphicsObject;
@@ -50,7 +50,7 @@ class ResultItem
static ResultItem* create(WorksheetEntry* parent, Cantor::Result* result);
virtual double setGeometry(double x, double y, double w) = 0;
- virtual void populateMenu(KMenu* menu, const QPointF& pos) = 0;
+ virtual void populateMenu(QMenu* menu, const QPointF& pos) = 0;
virtual ResultItem* updateFromResult(Cantor::Result* result) = 0;
@@ -64,7 +64,7 @@ class ResultItem
QGraphicsObject* graphicsObject();
protected:
- static void addCommonActions(QObject* self, KMenu* menu);
+ static void addCommonActions(QObject* self, QMenu* menu);
};
#endif // RESULTITEM_H
diff --git a/src/scripteditorwidget.cpp b/src/scripteditorwidget.cpp
index 65bdfcb..9258912 100644
--- a/src/scripteditorwidget.cpp
+++ b/src/scripteditorwidget.cpp
@@ -65,7 +65,7 @@ ScriptEditorWidget::ScriptEditorWidget(const QString& filter, const \
QString& hig
m_script->setHighlightingMode(highlightingMode);
- KConfigGroup cg(KGlobal::config(), "ScriptEditor");
+ KConfigGroup cg(KSharedConfig::openConfig(), "ScriptEditor");
setAutoSaveSettings(cg, true);
setCentralWidget(m_editor);
@@ -147,4 +147,4 @@ void ScriptEditorWidget::updateCaption()
}
}
-#include "scripteditorwidget.moc"
+
diff --git a/src/searchbar.cpp b/src/searchbar.cpp
index c6db657..b299860 100644
--- a/src/searchbar.cpp
+++ b/src/searchbar.cpp
@@ -26,7 +26,7 @@
#include <KLocale>
#include <QIcon>
-#include <KMenu>
+#include <QMenu>
#include <QDebug>
SearchBar::SearchBar(QWidget* parent, Worksheet* worksheet) : QWidget(parent)
@@ -292,7 +292,7 @@ void SearchBar::on_replacement_textChanged(const QString& r)
void SearchBar::on_removeFlag_clicked()
{
- KMenu* menu = new KMenu(this);
+ QMenu* menu = new QMenu(this);
fillLocationsMenu(menu, m_searchFlags);
connect(menu, SIGNAL("aboutToHide()"), menu, SLOT("deleteLater()"));
menu->exec(mapToGlobal(m_extUi->removeFlag->geometry().topLeft()));
@@ -300,7 +300,7 @@ void SearchBar::on_removeFlag_clicked()
void SearchBar::on_addFlag_clicked()
{
- KMenu* menu = new KMenu(this);
+ QMenu* menu = new QMenu(this);
fillLocationsMenu(menu, WorksheetEntry::SearchAll ^ m_searchFlags);
connect(menu, SIGNAL("aboutToHide()"), menu, SLOT("deleteLater()"));
menu->exec(mapToGlobal(m_extUi->addFlag->geometry().topLeft()));
@@ -376,7 +376,7 @@ void SearchBar::updateSearchLocations()
}
}
-void SearchBar::fillLocationsMenu(KMenu* menu, int flags)
+void SearchBar::fillLocationsMenu(QMenu* menu, int flags)
{
static QList<QString> names;
if (names.empty())
@@ -499,4 +499,4 @@ Worksheet* SearchBar::worksheet()
return m_worksheet;
}
-#include "searchbar.moc"
+
diff --git a/src/searchbar.h b/src/searchbar.h
index ea6b3e7..0857052 100644
--- a/src/searchbar.h
+++ b/src/searchbar.h
@@ -34,7 +34,7 @@ class Worksheet;
class WorksheetEntry;
class WorksheetTextItem;
-class KMenu;
+class QMenu;
class SearchBar : public QWidget
{
@@ -75,7 +75,7 @@ class SearchBar : public QWidget
private:
void updateSearchLocations();
- void fillLocationsMenu(KMenu* menu, int flags);
+ void fillLocationsMenu(QMenu* menu, int flags);
void setupStdUi();
void setupExtUi();
diff --git a/src/textentry.cpp b/src/textentry.cpp
index 4f08665..5398938 100644
--- a/src/textentry.cpp
+++ b/src/textentry.cpp
@@ -45,7 +45,7 @@ TextEntry::~TextEntry()
{
}
-void TextEntry::populateMenu(KMenu *menu, const QPointF& pos)
+void TextEntry::populateMenu(QMenu *menu, const QPointF& pos)
{
bool imageSelected = false;
QTextCursor cursor = m_textItem->textCursor();
diff --git a/src/textentry.h b/src/textentry.h
index 09b4a6c..d3693a5 100644
--- a/src/textentry.h
+++ b/src/textentry.h
@@ -71,7 +71,7 @@ class TextEntry : public WorksheetEntry
bool evaluate(EvaluationOption evalOp = FocusNext);
void resolveImagesAtCursor();
void updateEntry();
- void populateMenu(KMenu *menu, const QPointF& pos);
+ void populateMenu(QMenu *menu, const QPointF& pos);
protected:
bool wantToEvaluate();
diff --git a/src/textresultitem.cpp b/src/textresultitem.cpp
index d1eaa0e..9b8e79f 100644
--- a/src/textresultitem.cpp
+++ b/src/textresultitem.cpp
@@ -49,7 +49,7 @@ double TextResultItem::setGeometry(double x, double y, double w)
return WorksheetTextItem::setGeometry(x, y, w);
}
-void TextResultItem::populateMenu(KMenu* menu, const QPointF& pos)
+void TextResultItem::populateMenu(QMenu* menu, const QPointF& pos)
{
QAction * copy = KStandardAction::copy(this, SLOT(copy()), menu);
if (!textCursor().hasSelection())
@@ -179,5 +179,5 @@ Cantor::Result* TextResultItem::result()
return parentEntry()->expression()->result();
}
-#include "textresultitem.moc"
+
diff --git a/src/textresultitem.h b/src/textresultitem.h
index f1e9b86..560a41f 100644
--- a/src/textresultitem.h
+++ b/src/textresultitem.h
@@ -37,7 +37,7 @@ class TextResultItem : public WorksheetTextItem, public ResultItem
using WorksheetTextItem::setGeometry;
double setGeometry(double x, double y, double w);
- void populateMenu(KMenu* menu, const QPointF& pos);
+ void populateMenu(QMenu* menu, const QPointF& pos);
ResultItem* updateFromResult(Cantor::Result* result);
diff --git a/src/worksheet.cpp b/src/worksheet.cpp
index 670ad56..310e00c 100644
--- a/src/worksheet.cpp
+++ b/src/worksheet.cpp
@@ -1040,15 +1040,15 @@ EpsRenderer* Worksheet::epsRenderer()
return &m_epsRenderer;
}
-KMenu* Worksheet::createContextMenu()
+QMenu* Worksheet::createContextMenu()
{
- KMenu *menu = new KMenu(worksheetView());
+ QMenu *menu = new QMenu(worksheetView());
connect(menu, SIGNAL(aboutToHide()), menu, SLOT(deleteLater()));
return menu;
}
-void Worksheet::populateMenu(KMenu *menu, const QPointF& pos)
+void Worksheet::populateMenu(QMenu *menu, const QPointF& pos)
{
WorksheetEntry* entry = entryAt(pos);
if (entry && !entry->isAncestorOf(m_lastFocusedTextItem)) {
@@ -1067,8 +1067,8 @@ void Worksheet::populateMenu(KMenu *menu, const QPointF& pos)
menu->addSeparator();
if (entry) {
- KMenu* insert = new KMenu(menu);
- KMenu* insertBefore = new KMenu(menu);
+ QMenu* insert = new QMenu(menu);
+ QMenu* insertBefore = new QMenu(menu);
insert->addAction(i18n("Command Entry"), entry, SLOT(insertCommandEntry()));
insert->addAction(i18n("Text Entry"), entry, SLOT(insertTextEntry()));
@@ -1102,7 +1102,7 @@ void Worksheet::contextMenuEvent(QGraphicsSceneContextMenuEvent \
*event)
if (!event->isAccepted()) {
event->accept();
- KMenu *menu = createContextMenu();
+ QMenu *menu = createContextMenu();
populateMenu(menu, event->scenePos());
menu->popup(event->screenPos());
@@ -1655,4 +1655,4 @@ void Worksheet::updateDragScrollTimer()
m_dragScrollTimer->start();
}
-#include "worksheet.moc"
+
diff --git a/src/worksheet.h b/src/worksheet.h
index 18bee0b..9086e40 100644
--- a/src/worksheet.h
+++ b/src/worksheet.h
@@ -29,7 +29,7 @@
#include <QPrinter>
#include <KZip>
-#include <KMenu>
+#include <QMenu>
#include "worksheetview.h"
#include "epsrenderer.h"
@@ -81,8 +81,8 @@ class Worksheet : public QGraphicsScene
void startDrag(WorksheetEntry* entry, QDrag* drag);
void createActions(KActionCollection* collection);
- KMenu* createContextMenu();
- void populateMenu(KMenu* menu, const QPointF& pos);
+ QMenu* createContextMenu();
+ void populateMenu(QMenu* menu, const QPointF& pos);
EpsRenderer* epsRenderer();
bool isEmpty();
diff --git a/src/worksheetentry.cpp b/src/worksheetentry.cpp
index dc07333..bb67819 100644
--- a/src/worksheetentry.cpp
+++ b/src/worksheetentry.cpp
@@ -296,13 +296,13 @@ void WorksheetEntry::keyPressEvent(QKeyEvent* event)
void WorksheetEntry::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{
- KMenu *menu = worksheet()->createContextMenu();
+ QMenu *menu = worksheet()->createContextMenu();
populateMenu(menu, event->pos());
menu->popup(event->screenPos());
}
-void WorksheetEntry::populateMenu(KMenu *menu, const QPointF& pos)
+void WorksheetEntry::populateMenu(QMenu *menu, const QPointF& pos)
{
if (!worksheet()->isRunning() && wantToEvaluate())
menu->addAction(i18n("Evaluate Entry"), this, SLOT(evaluate()), 0);
@@ -799,4 +799,4 @@ bool WorksheetEntry::wantFocus()
return true;
}
-#include "worksheetentry.moc"
+
diff --git a/src/worksheetentry.h b/src/worksheetentry.h
index e3556aa..2ffaf95 100644
--- a/src/worksheetentry.h
+++ b/src/worksheetentry.h
@@ -85,7 +85,7 @@ class WorksheetEntry : public QGraphicsObject
virtual void layOutForWidth(qreal w, bool force = false) = 0;
QPropertyAnimation* sizeChangeAnimation(QSizeF s = QSizeF());
- virtual void populateMenu(KMenu *menu, const QPointF& pos);
+ virtual void populateMenu(QMenu *menu, const QPointF& pos);
bool aboutToBeRemoved();
QSizeF size();
diff --git a/src/worksheetimageitem.cpp b/src/worksheetimageitem.cpp
index a94e5e9..a024be7 100644
--- a/src/worksheetimageitem.cpp
+++ b/src/worksheetimageitem.cpp
@@ -25,14 +25,14 @@
#include <QImage>
#include <QGraphicsSceneContextMenuEvent>
#include <KUrl>
-#include <KMenu>
+#include <QMenu>
#include <QDebug>
WorksheetImageItem::WorksheetImageItem(QGraphicsObject* parent)
: QGraphicsObject(parent)
{
- connect(this, SIGNAL(menuCreated(KMenu*, const QPointF&)), parent,
- SLOT(populateMenu(KMenu*, const QPointF&)), Qt::DirectConnection);
+ connect(this, SIGNAL(menuCreated(QMenu*, const QPointF&)), parent,
+ SLOT(populateMenu(QMenu*, const QPointF&)), Qt::DirectConnection);
m_maxWidth = 0;
}
@@ -138,14 +138,14 @@ void WorksheetImageItem::setPixmap(QPixmap pixmap)
m_pixmap = pixmap;
}
-void WorksheetImageItem::populateMenu(KMenu *menu, const QPointF& pos)
+void WorksheetImageItem::populateMenu(QMenu *menu, const QPointF& pos)
{
emit menuCreated(menu, mapToParent(pos));
}
void WorksheetImageItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{
- KMenu *menu = worksheet()->createContextMenu();
+ QMenu *menu = worksheet()->createContextMenu();
populateMenu(menu, event->pos());
menu->popup(event->screenPos());
@@ -156,5 +156,5 @@ Worksheet* WorksheetImageItem::worksheet()
return qobject_cast<Worksheet*>(scene());
}
-#include "worksheetimageitem.moc"
+
diff --git a/src/worksheetimageitem.h b/src/worksheetimageitem.h
index e503a13..dc76d90 100644
--- a/src/worksheetimageitem.h
+++ b/src/worksheetimageitem.h
@@ -29,7 +29,7 @@ class QMovie;
class QImage;
class QGraphicsSceneContextMenuEvent;
class KUrl;
-class KMenu;
+class QMenu;
class WorksheetImageItem : public QGraphicsObject
{
@@ -61,12 +61,12 @@ class WorksheetImageItem : public QGraphicsObject
void setImage(QImage img);
void setPixmap(QPixmap pixmap);
- virtual void populateMenu(KMenu *menu, const QPointF& pos);
+ virtual void populateMenu(QMenu *menu, const QPointF& pos);
Worksheet* worksheet();
Q_SIGNALS:
void sizeChanged();
- void menuCreated(KMenu*, const QPointF&);
+ void menuCreated(QMenu*, const QPointF&);
protected:
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
diff --git a/src/worksheettextitem.cpp b/src/worksheettextitem.cpp
index c08b19d..2296590 100644
--- a/src/worksheettextitem.cpp
+++ b/src/worksheettextitem.cpp
@@ -41,6 +41,7 @@
#include <QAction>
#include <KColorDialog>
#include <KColorScheme>
+#include <QFontDatabase>
WorksheetTextItem::WorksheetTextItem(QGraphicsObject* parent, \
Qt::TextInteractionFlags ti) : QGraphicsTextItem(parent)
@@ -58,10 +59,10 @@ WorksheetTextItem::WorksheetTextItem(QGraphicsObject* parent, \
Qt::TextInteractio m_size = document()->size();;
m_maxWidth = -1;
setAcceptDrops(true);
- setFont(KGlobalSettings::fixedFont());
+ setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
connect(document(), SIGNAL(contentsChanged()), this, SLOT(testSize()));
- connect(this, SIGNAL(menuCreated(KMenu*, const QPointF&)), parent,
- SLOT(populateMenu(KMenu*, const QPointF&)), Qt::DirectConnection);
+ connect(this, SIGNAL(menuCreated(QMenu*, const QPointF&)), parent,
+ SLOT(populateMenu(QMenu*, const QPointF&)), Qt::DirectConnection);
connect(this, SIGNAL(deleteEntry()), parent, SLOT(startRemoving()));
connect(this, SIGNAL(cursorPositionChanged(QTextCursor)), this,
SLOT(updateRichTextActions(QTextCursor)));
@@ -146,7 +147,7 @@ qreal WorksheetTextItem::setGeometry(qreal x, qreal y, qreal w, \
bool centered) return m_size.height();
}
-void WorksheetTextItem::populateMenu(KMenu *menu, const QPointF& pos)
+void WorksheetTextItem::populateMenu(QMenu *menu, const QPointF& pos)
{
qDebug() << "populate Menu";
QAction * cut = KStandardAction::cut(this, SLOT(cut()), menu);
@@ -651,7 +652,7 @@ void WorksheetTextItem::dropEvent(QGraphicsSceneDragDropEvent* \
event)
void WorksheetTextItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{
- KMenu *menu = worksheet()->createContextMenu();
+ QMenu *menu = worksheet()->createContextMenu();
populateMenu(menu, event->pos());
menu->popup(event->screenPos());
@@ -898,4 +899,4 @@ void WorksheetTextItem::setFontSize(int size)
mergeFormatOnWordOrSelection(fmt);
}
-#include "worksheettextitem.moc"
+
diff --git a/src/worksheettextitem.h b/src/worksheettextitem.h
index 55bbd64..88d68f9 100644
--- a/src/worksheettextitem.h
+++ b/src/worksheettextitem.h
@@ -26,7 +26,7 @@
#include <QTextDocument>
#include <QTextCursor>
-#include <KMenu>
+#include <QMenu>
#include <KStandardAction>
class Worksheet;
@@ -65,7 +65,7 @@ class WorksheetTextItem : public QGraphicsTextItem
void setItemDragable(bool b);
void enableRichText(bool b);
- virtual void populateMenu(KMenu *menu, const QPointF& pos);
+ virtual void populateMenu(QMenu *menu, const QPointF& pos);
QString resolveImages(const QTextCursor& cursor);
bool isEditable();
@@ -112,7 +112,7 @@ class WorksheetTextItem : public QGraphicsTextItem
void execute();
void deleteEntry();
void sizeChanged();
- void menuCreated(KMenu*, const QPointF&);
+ void menuCreated(QMenu*, const QPointF&);
void drag(const QPointF&, const QPointF&);
void undoAvailable(bool);
void redoAvailable(bool);
diff --git a/src/worksheetview.cpp b/src/worksheetview.cpp
index ad68356..1a55eca 100644
--- a/src/worksheetview.cpp
+++ b/src/worksheetview.cpp
@@ -288,4 +288,4 @@ void WorksheetView::zoomOut()
updateSceneSize();
}
-#include "worksheetview.moc"
+
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic