author | zecke <zecke> | 2002-04-23 17:18:31 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-23 17:18:31 (UTC) |
commit | adf10e0e160b18fe329b6baccf5dc666d612fe8e (patch) (side-by-side diff) | |
tree | afe9af2b6a884ef31ce64e22f2a6fbcfb839742a /core/launcher/launcher.cpp | |
parent | 20959a35ed4ffa132643968b23d9af74003b41a2 (diff) | |
download | opie-adf10e0e160b18fe329b6baccf5dc666d612fe8e.zip opie-adf10e0e160b18fe329b6baccf5dc666d612fe8e.tar.gz opie-adf10e0e160b18fe329b6baccf5dc666d612fe8e.tar.bz2 |
fix the bugs
-rw-r--r-- | core/launcher/launcher.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index d1df4cc..f9c6c02 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -554,12 +554,14 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: int stamp = uidgen.generate(); QString newStamp = QString::number( stamp ); // generates newtime Stamp StorageInfo storage; const QList<FileSystem> &fileSystems = storage.fileSystems(); QListIterator<FileSystem> it ( fileSystems ); + + for ( ; it.current(); ++it ) { if ( (*it)->isRemovable() ) { // let's find out if we should search on it qWarning("%s is removeable", (*it)->path().latin1() ); OConfig cfg( (*it)->path() + "/.opiestorage.cf"); cfg.setGroup("main"); QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() ); @@ -570,18 +572,22 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: QStringList mimetypes = configToMime( &cfg); tmp = new DocLnkSet( (*it)->path(), mimetypes.join(";") ); docsFolder->appendFrom( *tmp ); delete tmp; }else{ // come up with the gui cause this a new card - MediumMountGui medium((*it)->path() ); + MediumMountGui medium(&cfg, (*it)->path() ); if( medium.check() ){ // we did not ask before or ask again is off if( medium.exec() ){ // he clicked yes so search it // speicher - cfg.read(); // cause of a race we need to reread + //cfg.read(); // cause of a race we need to reread - fixed cfg.writeEntry("timestamp", newStamp ); + cfg.write(); + tmp = new DocLnkSet( (*it)->path(), medium.mimeTypes().join(";" ) ); + docsFolder->appendFrom( *tmp ); + delete tmp; }// no else }else{ // we checked // do something different see what we need to do // let's see if we should check the device cfg.setGroup("main" ); bool check = cfg.readBoolEntry("autocheck", true ); |