Commit ec903a94 authored by Alexander A. Maly's avatar Alexander A. Maly

Fixing wrong help path

parent 426724fa
Pipeline #3600 failed with stages
in 2 minutes and 3 seconds
...@@ -103,7 +103,7 @@ QString Settings::settingsFilePath() const ...@@ -103,7 +103,7 @@ QString Settings::settingsFilePath() const
return result; return result;
} }
QString Settings::defaultSettingsScope() QString defaultSettingsScope()
{ {
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
static const QString result = "kumir2"; static const QString result = "kumir2";
......
...@@ -35,7 +35,6 @@ public: ...@@ -35,7 +35,6 @@ public:
protected: protected:
explicit Settings(const QString & pluginName_); explicit Settings(const QString & pluginName_);
void changeWorkingDirectory(const QString & workDirPath); void changeWorkingDirectory(const QString & workDirPath);
static QString defaultSettingsScope();
private: private:
QString pluginName_; QString pluginName_;
...@@ -46,6 +45,7 @@ private: ...@@ -46,6 +45,7 @@ private:
}; };
typedef QSharedPointer<Settings> SettingsPtr; typedef QSharedPointer<Settings> SettingsPtr;
extern QString defaultSettingsScope();
} // namespace ExtensionSystem } // namespace ExtensionSystem
......
...@@ -312,16 +312,7 @@ QString Plugin::initialize(const QStringList &parameters, const ExtensionSystem: ...@@ -312,16 +312,7 @@ QString Plugin::initialize(const QStringList &parameters, const ExtensionSystem:
"/userdocs/"; "/userdocs/";
const QString applicationLanucher = QDir::fromNativeSeparators(qApp->arguments().at(0)); QString applicationName = defaultSettingsScope();
QString applicationName =
applicationLanucher.startsWith(qApp->applicationDirPath())
? applicationLanucher.mid(qApp->applicationDirPath().length() + 1)
: applicationLanucher;
#ifdef Q_OS_WIN32
if (applicationName.endsWith(".exe")) {
applicationName.remove(applicationName.length() - 4, 4);
}
#endif
#ifndef Q_OS_MACX #ifndef Q_OS_MACX
QString indexFileName = applicationName + ".xml"; QString indexFileName = applicationName + ".xml";
...@@ -330,6 +321,8 @@ QString Plugin::initialize(const QStringList &parameters, const ExtensionSystem: ...@@ -330,6 +321,8 @@ QString Plugin::initialize(const QStringList &parameters, const ExtensionSystem:
QString indexFileName = "index-macx.xml"; QString indexFileName = "index-macx.xml";
#endif #endif
qDebug() << "IndexFileName:" << indexFileName;
Shared::AnalizerInterface *analizerPlugin = Shared::AnalizerInterface *analizerPlugin =
ExtensionSystem::PluginManager::instance() ExtensionSystem::PluginManager::instance()
->findPlugin<Shared::AnalizerInterface>(); ->findPlugin<Shared::AnalizerInterface>();
...@@ -364,12 +357,12 @@ QString Plugin::initialize(const QStringList &parameters, const ExtensionSystem: ...@@ -364,12 +357,12 @@ QString Plugin::initialize(const QStringList &parameters, const ExtensionSystem:
} }
indexFileName = helpPath + indexFileName; indexFileName = helpPath + indexFileName;
qDebug() << "Full indexFileName:" << indexFileName;
if (QFile::exists(indexFileName)) { if (QFile::exists(indexFileName)) {
helpViewer_->addDocument(QUrl::fromLocalFile(indexFileName)); helpViewer_->addDocument(QUrl::fromLocalFile(indexFileName));
} }
helpWindow_ = Widgets::SecondaryWindow::createSecondaryWindow( helpWindow_ = Widgets::SecondaryWindow::createSecondaryWindow(
helpViewer_, helpViewer_,
tr("Help"), tr("Help"),
......
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