-rw-r--r-- | core/launcher/launcher.cpp | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index b26bd8b..dcc3ba1 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -75,2 +75,6 @@ +// uidGen + +// uidGen + CategoryTabWidget::CategoryTabWidget( QWidget* parent ) : @@ -424,3 +428,5 @@ Launcher::Launcher( QWidget* parent, const char* name, WFlags fl ) docsFolder = 0; - m_timeStamp = QDateTime::currentDateTime().toString(); + int stamp = uidgen.generate(); + uidgen.store( stamp ); + m_timeStamp = QString::number( stamp ); @@ -502,4 +508,7 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: { + qWarning("loading Documents" ); + qWarning("The currentTimeStamp is: %s", m_timeStamp.latin1() ); delete docsFolder; docsFolder = new DocLnkSet; + qWarning("new DocLnkSet" ); // find out wich filesystems are new in this round @@ -508,8 +517,16 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: // come up with our MediumMountGui :) let the hacking begin - QString newStamp = QDateTime::currentDateTime().toString(); + int stamp = uidgen.generate(); + + QString newStamp = QString::number( stamp ); + qWarning("new time stamp is: %s", newStamp.latin1() ); StorageInfo storage; const QList<FileSystem> &fileSystems = storage.fileSystems(); + qWarning("QList<FileSystem>" ); QListIterator<FileSystem> it ( fileSystems ); + qWarning("iterator initiliazed" ); for ( ; it.current(); ++it ) { + qWarning("inside for loop" ); + qWarning("checking device %s", (*it)->path().latin1() ); 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"); @@ -518,2 +535,3 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: if( stamp == m_timeStamp ){ // ok we know this card + qWarning("time stamp match" ); cfg.writeEntry("timestamp", newStamp ); @@ -521,6 +539,10 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: }else{ // come up with the gui - MediumMountGui medium((*it)->path() + "/.opiestorage.cf" ); + qWarning("time stamp doesn't match" ); + MediumMountGui medium((*it)->path() ); + qWarning("medium mount gui created" ); if( medium.check() ){ + qWarning("need to check this device" ); if( medium.exec() ){ //ok // speicher + qWarning("execed" ); cfg.writeEntry("timestamp", newStamp ); @@ -528,2 +550,3 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: }else{ + qWarning("wrong :(" ); // do something different see what we need to do @@ -533,3 +556,5 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: } + qWarning("findDocuments" ); Global::findDocuments(docsFolder); // get rid of this call later + qWarning("done" ); m_timeStamp = newStamp; |