奥特QT DDS 插件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 line
463B

  1. #include "PluginLoader.hpp"
  2. PluginLoader::PluginLoader(QObject *parent)
  3. : QObject(parent)
  4. {}
  5. QObject *PluginLoader::loadPlugin(const QString &path)
  6. {
  7. if (m_loader.isLoaded()) {
  8. m_loader.unload();
  9. }
  10. m_loader.setFileName(path);
  11. return m_loader.instance();
  12. }
  13. bool PluginLoader::unloadPlugin()
  14. {
  15. return m_loader.unload();
  16. }
  17. QString PluginLoader::errorString() const
  18. {
  19. return m_loader.errorString();
  20. }