Commit 023d201c authored by Jan Möbius's avatar Jan Möbius

Added functions to globaloptions to get parameters for main

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@2593 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2a77acc4
......@@ -155,6 +155,8 @@ void segfaultHandling (int) {
int main(int argc, char **argv)
{
OpenFlipper::Options::argc(argc);
OpenFlipper::Options::argv(argv);
// Only Install signal handler if not running in debug version, otherwise gdb will get confused
#ifndef DEBUG
......
......@@ -120,6 +120,10 @@ static bool enableBackup_ = true;
/// Currently opening an ini file?
static bool openingIni_ = false;
static int argc_;
static char ** argv_;
# if __WORDSIZE == 64
const bool is64 = true;
#else
......@@ -417,6 +421,22 @@ void openingIni(bool _openingIni ) {
openingIni_ = _openingIni;
}
int argc() {
return argc_;
}
char ** argv() {
return argv_;
}
void argc( int _argc ) {
argc_ = _argc;
}
void argv( char** _argv) {
argv_ = _argv;
}
}
}
......
......@@ -426,6 +426,28 @@ bool iconDir(QString _dir);
/** @} */
//===========================================================================
/** @name Core parameters
* @{ */
//===========================================================================
/// Get the argc parameter from the main application
DLLEXPORT
int argc();
/// Get the argv parameter from the main application
DLLEXPORT
char ** argv();
/// Set the argc parameter from the main application ( Dont use it, only called from Core!!)
DLLEXPORT
void argc( int _argc );
/// Set the argv parameter from the main application ( Dont use it, only called from Core!!)
DLLEXPORT
void argv( char** _argv);
/** @} */
}
}
......
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