diff options
author | Chris Xiong <chirs241097@gmail.com> | 2020-01-11 22:04:07 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2020-01-11 22:57:01 +0800 |
commit | 12ad6495fa332ea499485082272f796c4b08c83c (patch) | |
tree | 644607f6523185050a069fcf6eb6255c45060181 /qmidiplayer-desktop/qmpplugin.cpp | |
parent | 06496661120f7858f26a29f76631e6f0a0ebae7f (diff) | |
download | QMidiPlayer-12ad6495fa332ea499485082272f796c4b08c83c.tar.xz |
Bring back i18n support.
Address compiler warnings in QDialSkualptureStyle.
Introduced build BUILD_PORTABLE, replacing QMP_BUILD_MODE in the QMake project.
The QMake project is now fully covered by the CMake project and officially
deprecated.
Diffstat (limited to 'qmidiplayer-desktop/qmpplugin.cpp')
-rw-r--r-- | qmidiplayer-desktop/qmpplugin.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp index 8f16573..19d14b5 100644 --- a/qmidiplayer-desktop/qmpplugin.cpp +++ b/qmidiplayer-desktop/qmpplugin.cpp @@ -55,13 +55,16 @@ void qmpPluginManager::scanPlugins(const std::vector<std::string> &pp) { QDirIterator *dir; std::vector<std::string> cpluginpaths(pp); -#ifdef QMP_BUILD_UNIX_PACKAGE - dir=new QDirIterator("/usr/lib/qmidiplayer/"); +#ifdef NON_PORTABLE +#define strify(s) #s + QString pdir=QString(strify(INSTALL_PREFIX))+"/lib/qmidiplayer/"; +#undef strify + dir=new QDirIterator(pdir); while(dir->hasNext()) { dir->next(); if(dir->fileInfo().suffix()=="so") - cpluginpaths.push_back(std::string("/usr/lib/qmidiplayer/")+dir->fileName().toStdString()); + cpluginpaths.push_back((pdir+dir->fileName()).toStdString()); } delete dir; #endif |