Commit 34cefa0b authored by Nikita Sirgienko's avatar Nikita Sirgienko
Browse files

Move Cantor plugin path setting into Settings. Now user can manually change this path

parent 0e108c8b
......@@ -4,6 +4,8 @@
xsi:schemaLocation="" >
<group name="Cantor">
<entry name="DefaultBackend" type="String">
......@@ -54,6 +56,10 @@
<label>Limit of visible lines for text result</label>
<entry name="PathToCantorPluginsDir" type="Url">
<label>Path to directory, which contains Cantor plugins (cantorpart and all backends)</label>
<default code="true">QUrl::fromLocalFile(QString::fromLocal8Bit(PATH_TO_CANTOR_PLUGINS))</default>
......@@ -31,6 +31,9 @@
#include <QUrl>
#include <QFileInfo>
#include <QDir>
#include <QDebug>
#include "settings.h"
static const char description[] =
I18N_NOOP("KDE Frontend to mathematical applications");
......@@ -39,14 +42,11 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
// Add our custom plugins path, where we install our plugins, if it isn't default path
const QString& path = QString::fromLocal8Bit(PATH_TO_CANTOR_PLUGINS);
const QString& path = Settings::pathToCantorPluginsDir().toLocalFile();
qDebug() << "Adding additional application library path" << path;
if (!QCoreApplication::libraryPaths().contains(path))
qDebug() << "PATH_TO_CANTOR_PLUGINS variable is not set (probably a bug), so use the default library paths";
......@@ -148,6 +148,29 @@
<widget class="QGroupBox" name="groupBox2">
<property name="title">
<string>Paths (advance settings)</string>
<layout class="QVBoxLayout" name="verticalLayout_5">
<layout class="QHBoxLayout" name="horizontalLayout2">
<widget class="QLabel" name="label2">
<property name="text">
<string>Path to Cantor plugin directory:</string>
<widget class="KUrlRequester" name="kcfg_PathToCantorPluginsDir"/>
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