]> Creatis software - cpPlugins.git/blobdiff - appli/ImageMPR/ImageMPR.cxx
The beast is alive on MSWin!!!
[cpPlugins.git] / appli / ImageMPR / ImageMPR.cxx
index 1d0570304d3c6a00f7cabebd074188f5e3cc51e8..025b8c841dfb1d31bb89545f1e32d7e892eb9b7d 100644 (file)
@@ -6,6 +6,14 @@
 #include <QFileDialog>
 #include <QMessageBox>
 
+#ifdef _WIN32
+#  define PLUGIN_EXT "dll"
+#  define PLUGIN_REGEX "Plugins file (*.dll);;All files (*)"
+#else
+#  define PLUGIN_EXT "so"
+#  define PLUGIN_REGEX "Plugins file (*.so);;All files (*)"
+#endif // _WIN32
+
 // -------------------------------------------------------------------------
 ImageMPR::ImageMPR( QWidget* parent )
   : QMainWindow( parent ),
@@ -56,10 +64,8 @@ _triggered_actionOpenPlugins( )
   QFileDialog dialog( this );
   dialog.setFileMode( QFileDialog::ExistingFile );
   dialog.setDirectory( "." );
-  dialog.setNameFilter(
-    tr( "Plugins file (*.so);;All files (*)" )
-    );
-  dialog.setDefaultSuffix( tr( "so" ) );
+  dialog.setNameFilter( tr( PLUGIN_REGEX ) );
+  dialog.setDefaultSuffix( tr( PLUGIN_EXT ) );
   if( !( dialog.exec( ) ) )
     return;