Skip to content
Snippets Groups Projects
Commit 211ee7a4 authored by Dirk Wilden's avatar Dirk Wilden
Browse files

writeVersions to file slot

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3530 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 51e0c0bc
No related branches found
No related tags found
No related merge requests found
......@@ -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);
/** @} */
//===========================================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment