diff options
author | Chris Xiong <chirs241097@gmail.com> | 2017-02-14 17:48:22 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2017-02-14 17:48:22 +0800 |
commit | 844ddb2e0a6cdddf183ca3ecf08d1cedece27c71 (patch) | |
tree | 8d67356db4cbc9f981fb98d69ed052392f3f38cc /qmidiplayer-desktop | |
parent | 0355a9b37694fd0d25fedb7c50e28cf30ad45ed7 (diff) | |
download | QMidiPlayer-844ddb2e0a6cdddf183ca3ecf08d1cedece27c71.tar.xz |
Scan for plugins in the executable directory instead of the working
directory.
Diffstat (limited to 'qmidiplayer-desktop')
-rw-r--r-- | qmidiplayer-desktop/qmpplugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp index c9a3671..5889b9f 100644 --- a/qmidiplayer-desktop/qmpplugin.cpp +++ b/qmidiplayer-desktop/qmpplugin.cpp @@ -17,12 +17,12 @@ void qmpPluginManager::scanPlugins() { QDirIterator *dir; std::vector<std::string> cpluginpaths; - dir=new QDirIterator(".\\plugins\\"); + dir=new QDirIterator(QCoreApplication::applicationDirPath()+"/plugins/"); while(dir->hasNext()) { dir->next(); if(dir->fileInfo().suffix()=="dll") - cpluginpaths.push_back(std::string(".\\plugins\\")+dir->fileName().toStdString()); + cpluginpaths.push_back(QCoreApplication::applicationDirPath().toStdString()+std::string("/plugins/")+dir->fileName().toStdString()); } delete dir; for(unsigned i=0;i<cpluginpaths.size();++i) |