[Patch proposal] Last plugin is not loaded

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Patch proposal] Last plugin is not loaded

lasconic
Administrator

Test case : Fresh install of mscore with two scripts test.js and test2.js.  On windows, test2.js is never loaded

I think that there is a problem in the loading loop of the plugin.

 QDirIterator it(pluginDir, QDirIterator::Subdirectories);
      while (it.hasNext()) {
            QFileInfo fi = it.fileInfo();
            if (fi.isFile()) {
                  QString path(fi.filePath());
                  if (path.endsWith(".js"))
                        registerPlugin(path);
                  }
            it.next();
            }
      }


The last js file is never loaded.

(if iterator works the same way than in java) I propose :

  QDirIterator it(pluginDir, QDirIterator::Subdirectories);
      while (it.hasNext()) {
             it.next();
            QFileInfo fi = it.fileInfo();
            if (fi.isFile()) {
                  QString path(fi.filePath());
                  if (path.endsWith(".js"))
                        registerPlugin(path);
                  }
            }
      }



I did not test it ...

Patch on 1054 is attached. (I prefer patch then commit for now :) don't want to break something :))

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer

plugins.cpp.patch (848 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Patch proposal] Last plugin is not loaded

wschweer
Administrator
You are right. Its a java style iterator which works different than the way
i am used to. Patch is applied in revision 1055.

/ws

On Freitag 25 Juli 2008, Lasconic wrote:

> Test case : Fresh install of mscore with two scripts test.js and test2.js.
> On windows, test2.js is never loaded
>
> I think that there is a problem in the loading loop of the plugin.
>
>  QDirIterator it(pluginDir, QDirIterator::Subdirectories);
>       while (it.hasNext()) {
>             QFileInfo fi = it.fileInfo();
>             if (fi.isFile()) {
>                   QString path(fi.filePath());
>                   if (path.endsWith(".js"))
>                         registerPlugin(path);
>                   }
>             it.next();
>             }
>       }
>
>
> The last js file is never loaded.
>
> (if iterator works the same way than in java) I propose :
>
>   QDirIterator it(pluginDir, QDirIterator::Subdirectories);
>       while (it.hasNext()) {
>              it.next();
>             QFileInfo fi = it.fileInfo();
>             if (fi.isFile()) {
>                   QString path(fi.filePath());
>                   if (path.endsWith(".js"))
>                         registerPlugin(path);
>                   }
>             }
>       }
>
>
>
> I did not test it ...
>
> Patch on 1054 is attached. (I prefer patch then commit for now :) don't want
> to break something :))
>




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: [Patch proposal] Last plugin is not loaded

lasconic
Administrator
Great ! In the meantime I test it on windows and it works !

2008/7/30 Werner Schweer <[hidden email]>
You are right. Its a java style iterator which works different than the way
i am used to. Patch is applied in revision 1055.

/ws

On Freitag 25 Juli 2008, Lasconic wrote:
> Test case : Fresh install of mscore with two scripts test.js and test2.js.
> On windows, test2.js is never loaded
>
> I think that there is a problem in the loading loop of the plugin.
>
>  QDirIterator it(pluginDir, QDirIterator::Subdirectories);
>       while (it.hasNext()) {
>             QFileInfo fi = it.fileInfo();
>             if (fi.isFile()) {
>                   QString path(fi.filePath());
>                   if (path.endsWith(".js"))
>                         registerPlugin(path);
>                   }
>             it.next();
>             }
>       }
>
>
> The last js file is never loaded.
>
> (if iterator works the same way than in java) I propose :
>
>   QDirIterator it(pluginDir, QDirIterator::Subdirectories);
>       while (it.hasNext()) {
>              it.next();
>             QFileInfo fi = it.fileInfo();
>             if (fi.isFile()) {
>                   QString path(fi.filePath());
>                   if (path.endsWith(".js"))
>                         registerPlugin(path);
>                   }
>             }
>       }
>
>
>
> I did not test it ...
>
> Patch on 1054 is attached. (I prefer patch then commit for now :) don't want
> to break something :))
>




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer