Summary: | Filename of project filelist file does NOT regard case sensitive information | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Achim Spangler <Achim.Spangler> |
Component: | general | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Achim Spangler
2007-01-11 16:02:48 UTC
SVN commit 622458 by apaku: Finally fix all mixed-case/lower-case problems by reading lower or mixed case and always saving using the projectname which defaults to the filename part of the .kdevelop file BUG: 139911 M +8 -1 buildtools/custommakefiles/customprojectpart.cpp M +31 -11 languages/cpp/cppsupportpart.cpp M +10 -2 languages/java/javasupportpart.cpp M +1 -1 parts/doxygen/doxygenpart.cpp --- branches/kdevelop/3.4/buildtools/custommakefiles/customprojectpart.cpp #622457:622458 @@ -302,7 +302,14 @@ if (m_filelistDir.isEmpty()) m_filelistDir=dirName; - QFile f(m_filelistDir + "/" + projectName.lower() + ".kdevelop.filelist"); + if( QFileInfo(m_filelistDir + "/" + projectName.lower() + + ".kdevelop.filelist").exists() ) + { + QDir( m_filelistDir ).rename( + projectName.lower()+".kdevelop.filelist", + projectName+".kdevelop.filelist"); + } + QFile f( m_filelistDir + "/" + projectName + ".kdevelop.filelist" ); if (f.open(IO_ReadOnly)) { QTextStream stream(&f); while (!stream.atEnd()) { --- branches/kdevelop/3.4/languages/cpp/cppsupportpart.cpp #622457:622458 @@ -1349,11 +1349,23 @@ kapp->setOverrideCursor( waitCursor ); _jd = new JobData; - _jd->file.setName( project() ->projectDirectory() + "/" + project() ->projectName().lower() + ".kdevelop" + ".pcs" ); + if( QFileInfo( project() ->projectDirectory() + "/" + project()->projectName().lower() + + ".kdevelop.pcs" ).exists()) + { + QDir d(project()->projectDirectory()).rename( + project()->projectName().lower() + ".kdevelop.pcs", + project()->projectName() +".kdevelop.pcs"); + } + _jd->file.setName( project() ->projectDirectory() + "/" + project()->projectName() + + ".kdevelop.pcs" ); + + QString skip_file_name = project() ->projectDirectory() + "/" + + project() ->projectName() + ".kdevelop.ignore_pcs"; + QString skip_lower_file_name = project() ->projectDirectory() + "/" + + project() ->projectName().lower() + ".kdevelop.ignore_pcs"; - QString skip_file_name = project() ->projectDirectory() + "/" + project() ->projectName().lower() + ".kdevelop" + ".ignore_pcs"; - - if ( !force && !QFile::exists( skip_file_name ) && _jd->file.open( IO_ReadOnly ) ) + if ( !force && !QFile::exists( skip_file_name ) && + !QFile::exists( skip_lower_file_name ) && _jd->file.open( IO_ReadOnly ) ) { _jd->stream.setDevice( &( _jd->file ) ); @@ -1494,8 +1506,13 @@ kapp->restoreOverrideCursor( ); emit updatedSourceInfo(); mainWindow( ) ->statusBar( ) ->message( i18n( "Done" ), 2000 ); - QFile::remove - ( project() ->projectDirectory() + "/" + project() ->projectName().lower() + ".kdevelop" + ".ignore_pcs" ); + QFile::remove( project() ->projectDirectory() + + "/" + project() ->projectName() + + ".kdevelop.ignore_pcs" ); + QFile::remove( project() ->projectDirectory() + + "/" + project() ->projectName().lower() + + ".kdevelop.ignore_pcs" ); + } else { @@ -2030,7 +2047,8 @@ if ( !project() || fileList.isEmpty() ) return ; - QFile f( project() ->projectDirectory() + "/" + project() ->projectName().lower() + ".kdevelop" + ".pcs" ); + QFile f( project() ->projectDirectory() + "/" + + project() ->projectName() + ".kdevelop.pcs" ); if ( !f.open( IO_WriteOnly ) ) return ; @@ -2070,9 +2088,10 @@ stream.device() ->at( end ); } - QString skip_file_name = project() ->projectDirectory() + "/" + project() ->projectName().lower() + ".kdevelop" + ".ignore_pcs"; - QFile::remove - ( skip_file_name ); + QFile::remove( project() ->projectDirectory() + "/" + + project() ->projectName() + ".kdevelop.ignore_pcs" ); + QFile::remove( project() ->projectDirectory() + "/" + + project() ->projectName().lower() + ".kdevelop.ignore_pcs" ); m_backgroundParser->unlock(); } @@ -2553,7 +2572,8 @@ { static QCString skip_me( "ignore me\n" ); - QString skip_file_name = project() ->projectDirectory() + "/" + project() ->projectName().lower() + ".kdevelop" + ".ignore_pcs"; + QString skip_file_name = project() ->projectDirectory() + "/" + + project() ->projectName() + ".kdevelop.ignore_pcs"; QFile skip_pcs_file( skip_file_name ); if ( skip_pcs_file.open( IO_WriteOnly ) ) { --- branches/kdevelop/3.4/languages/java/javasupportpart.cpp #622457:622458 @@ -528,7 +528,14 @@ QDataStream stream; QMap< QString, QPair<uint, uint> > pcs; - QFile f( project()->projectDirectory() + "/" + project()->projectName().lower() + ".kdevelop" + ".pcs" ); + if( QFileInfo( project()->projectDirectory() + "/" + + project()->projectName().lower() + ".kdevelop.pcs" ).exists() ) + { + QDir(project()->projectDirectory()).rename( + project()->projectName().lower() + ".kdevelop.pcs", + project()->projectName() + ".kdevelop.pcs"); + } + QFile f(project()->projectDirectory() + "/" + project()->projectName() + ".kdevelop.pcs"); if( f.open(IO_ReadOnly) ){ stream.setDevice( &f ); @@ -864,7 +871,8 @@ if( !project() || fileList.isEmpty() ) return; - QFile f( project()->projectDirectory() + "/" + project()->projectName().lower() + ".kdevelop" + ".pcs" ); + QFile f( project()->projectDirectory() + "/" + + project()->projectName() + ".kdevelop.pcs" ); if( !f.open( IO_WriteOnly ) ) return; --- branches/kdevelop/3.4/parts/doxygen/doxygenpart.cpp #622457:622458 @@ -195,7 +195,7 @@ ConfigString *gen_tag = dynamic_cast<ConfigString*>(Config::instance()->get("GENERATE_TAGFILE")); if (gen_tag) { - gen_tag->setDefaultValue(QString(project()->projectName().lower().remove(".kdevelop")+".tag").latin1()); + gen_tag->setDefaultValue(QString(project()->projectName()+".tag").latin1()); gen_tag->init(); } THANKS for the quick resolve. It works now FINE for my projects! (in Bugzilla, I'd mark this now as "CLOSED" ;-)) ) |