+/**
+ * Expands plugin names for the selected platform.
+ * @param name Name of the plugin
+ * @return Expanded plugin name
+ *
+ * This function expands the plugin name so that it becomes valid for the selected platform.
+ * For example, on Linux it adds the prefix "lib" to the beginning and extension ".so" to the end.
+ */
+inline QString expandPluginName(QString const & name)
+{
+#ifdef Q_OS_WIN32
+# ifdef Q_CC_MINGW
+ return "lib" + name + ".dll";
+# else
+ return name + ".dll";
+# endif
+#elif defined Q_OS_LINUX
+ return "lib" + name + ".so";
+#elif defined Q_OS_CYGWIN
+ return "cyg" + name + ".dll";
+#else
+ return name;
+#endif
+}
+