Commit f0c3c2d5 authored by Dirk Wilden's avatar Dirk Wilden

writeVersions to file slot

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3530 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6c13efbe
......@@ -909,6 +909,35 @@ void Core::resizeViewer(int _width, int _height ){
}
}
void Core::writeVersionNumbers(QString _filename){
INIFile ini;
if ( ! ini.connect(_filename,true) ) {
emit log(LOGERR,"Failed to connect to _ini file" + _filename);
return;
}
//add coreVersion
ini.add_section( "Core" );
if ( OpenFlipper::Options::isWindows() )
ini.add_entry( "Core" , "VersionWindows" , OpenFlipper::Options::coreVersion() );
else
ini.add_entry( "Core" , "VersionLinux" , OpenFlipper::Options::coreVersion() );
//add pluginVersions
for (uint i=0; i < plugins.size(); i++){
ini.add_section( plugins[i].name );
if ( OpenFlipper::Options::isWindows() )
ini.add_entry( plugins[i].name , "VersionWindows" , plugins[i].version );
else
ini.add_entry( plugins[i].name , "VersionLinux" , plugins[i].version );
}
ini.disconnect();
}
/// set the descriptions for scriptable slots of the core
void Core::setDescriptions(){
......@@ -944,7 +973,9 @@ void Core::setDescriptions(){
emit setSlotDescription("resizeViewer(int,int)", "Resize the viewer",
QString("width,height").split(","),
QString("new width for the viewer,new height for the viewer").split(","));
emit setSlotDescription("writeVersionNumbers(QString)", "write the current versions of all plugins to INI file",
QStringList("filename"),
QStringList("fullpath to a file where the versions should be written to."));
}
// //-----------------------------------------------------------------------------
//
......
......@@ -313,6 +313,9 @@ public slots:
/// resize the examinerViewer
void resizeViewer(int _width, int _height );
/// write the current versions of all plugins to ini file
void writeVersionNumbers(QString _filename);
/** @} */
//===========================================================================
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment