void KNGlobal::updateInfrastructure() { //Update the library directory path. QString oldLibraryPath=m_dirPath[LibraryDir]; //Get the directory path from the configure, use the old library path as the //default value. QString savedLibraryDir= systemConfigure()->data("LibraryPath", oldLibraryPath).toString(); //Construct the saved library directory path. QDir savedDirectory(savedLibraryDir); //Check the library directory is exist or not. if((!savedDirectory.exists()) && //Try to build the directory. KNUtil::ensurePathValid(savedLibraryDir).isEmpty()) { //! FIXME: report the update error. return; } //Save the new library directory path. m_dirPath[LibraryDir]=savedDirectory.absolutePath(); //Check if the previous directory is just the same as the current one. //If they are different, emit the library moved signal to update. if(oldLibraryPath!=m_dirPath[LibraryDir]) { emit libraryPathChanged(oldLibraryPath, m_dirPath[LibraryDir]); } }
void KNGlobal::updateInfrastructure() { //Update the library directory path. QString oldLibraryPath=m_dirPath[LibraryDir]; //Get the directory path from the configure, use the old library path as the //default value. m_dirPath[LibraryDir]= systemConfigure()->data("LibraryPath", oldLibraryPath).toString(); //Check if the previous directory is just the same as the current one. //If they are different, emit the library moved signal to update. if(oldLibraryPath!=m_dirPath[LibraryDir]) { emit libraryPathChanged(oldLibraryPath, m_dirPath[LibraryDir]); } }