Logo Search packages:      
Sourcecode: kconfigure version File versions  Download package

void Kconfigure::openURL ( const KURL &  url  )  [slot]

Open file

Open file

Definition at line 685 of file kconfigure.cpp.

References actionfilemenu_CHANGELOG, actionfilemenu_INSTALL, actionfilemenu_README, file_CHANGELOG, file_INSTALL, file_README, fileName, filePath, logHtml, logOn, logString, openExtractURL(), recentFiles, and setActionMode().

Referenced by openURLnew(), and setupMenuBar().

{

      if( url.fileName().right(6) == "tar.gz" || url.fileName().right(4) == ".tgz" )
      {
            if( !openExtractURL( url, "z" ) ) return;
      }
      else if ( url.fileName().right(7) == "tar.bz2" ) 
      {
            if( !openExtractURL( url, "j" ) ) return;
      }
      else
      {
            filePath = url.directory(false,true);
            fileName = url.fileName();
            recentFiles->addURL( url );
      }

      if( logOn )
      {
            if( logHtml )
                  logString += "<p><b>" + i18n("Open project : %1").arg(filePath) + "</b></p>";
            else
                  logString += ">> " + i18n("Open project : %1").arg(filePath) + "\n\n";
      }

      this->setCaption("[" + filePath + "]" );
      if( QFile::QFile(filePath+"README").exists() )  
      {
            actionfilemenu_README->setEnabled(true);
            file_README = "README";
      } else if( QFile::QFile(filePath+"readme").exists() )
      {
            actionfilemenu_README->setEnabled(true);
            file_README = "readme";
      } else if( QFile::QFile(filePath+"Readme").exists() )
      {
            actionfilemenu_README->setEnabled(true);
            file_README = "Readme";
      }

      if( QFile::QFile(filePath+"INSTALL").exists() )       
      {
            actionfilemenu_INSTALL->setEnabled(true);
            file_INSTALL = "INSTALL";
      } else if( QFile::QFile(filePath+"install").exists() )
      {
            actionfilemenu_INSTALL->setEnabled(true);
            file_INSTALL = "install";
      } else if( QFile::QFile(filePath+"Install").exists() )
      {
            actionfilemenu_INSTALL->setEnabled(true);
            file_INSTALL = "Install";
      }

      if( QFile::QFile(filePath+"CHANGELOG").exists() )     
      {
            actionfilemenu_CHANGELOG->setEnabled(true);
            file_CHANGELOG = "CHANGELOG";
      } else if( QFile::QFile(filePath+"changelog").exists() )
      {
            actionfilemenu_CHANGELOG->setEnabled(true);
            file_CHANGELOG = "changelog";
      } else if( QFile::QFile(filePath+"ChangeLog").exists() )
      {
            actionfilemenu_CHANGELOG->setEnabled(true);
            file_CHANGELOG = "ChangeLog";
      } else if( QFile::QFile(filePath+"Changelog").exists() )
      {
            actionfilemenu_CHANGELOG->setEnabled(true);
            file_CHANGELOG = "Changelog";
      }
      setActionMode( true, false );
}


Generated by  Doxygen 1.6.0   Back to index