Commit 9258b46e authored by Jan Möbius's avatar Jan Möbius

Removed simpleopt and use Qt commandline parser instead

parent 36fd3158
......@@ -835,7 +835,7 @@ private slots:
* the current path will be prepended.
* @param _asPolyMesh Load as a polymesh ( yes/no)
*/
void commandLineOpen(const char* _filename, bool _asPolyMesh );
void commandLineOpen(const QString& _filename, bool _asPolyMesh );
/** \brief Load a script from the commandline on application start
*
......@@ -847,7 +847,7 @@ private slots:
* @param _filename filename of the script to be opened. If it does not contain a full path,
* the current path will be prepended.
*/
void commandLineScript(const char* _filename );
void commandLineScript(const QString& _filename );
private slots:
......@@ -861,10 +861,10 @@ private slots:
private:
/// Vector storing filenames from commandline to be opened after application startup (objects)
std::vector< std::pair < std::string , bool > > commandLineFileNames_;
std::vector< std::pair < QString , bool > > commandLineFileNames_;
/// Vector storing filenames from commandline to be opened after application startup (script files)
std::vector< std::string > commandLineScriptNames_;
std::vector< QString > commandLineScriptNames_;
public:
......
......@@ -99,9 +99,9 @@ void Core::slotGetAllFilters ( QStringList& _list){
}
}
void Core::commandLineOpen(const char* _filename, bool _asPolyMesh ){
void Core::commandLineOpen(const QString& _filename, bool _asPolyMesh ){
QString file(_filename);
QString file = _filename;
// Modify filename to contain full paths if they were given as relative paths
if ( !file.startsWith("/") && !file.contains(":") ) {
......@@ -111,12 +111,12 @@ void Core::commandLineOpen(const char* _filename, bool _asPolyMesh ){
}
// Add to the open list
commandLineFileNames_.push_back(std::pair< std::string , bool >(file.toStdString(), _asPolyMesh));
commandLineFileNames_.push_back(std::pair< QString , bool >(file, _asPolyMesh));
}
void Core::commandLineScript(const char* _filename ) {
void Core::commandLineScript(const QString& _filename ) {
QString file(_filename);
QString file = _filename;
// Modify filename to contain full paths if they were given as relative paths
if ( !file.startsWith("/") && !file.contains(":") ) {
......@@ -126,7 +126,7 @@ void Core::commandLineScript(const char* _filename ) {
}
// Add to the open list
commandLineScriptNames_.push_back(file.toStdString());
commandLineScriptNames_.push_back(file);
}
void Core::slotExecuteAfterStartup() {
......@@ -168,7 +168,7 @@ void Core::slotExecuteAfterStartup() {
for ( uint i = 0 ; i < commandLineFileNames_.size() ; ++i ) {
// Skip scripts here as they will be handled by a different function
QString tmp = QString::fromStdString(commandLineFileNames_[i].first);
QString tmp = commandLineFileNames_[i].first;
if ( tmp.endsWith("ofs",Qt::CaseInsensitive) ) {
commandLineScriptNames_.push_back(commandLineFileNames_[i].first);
continue;
......@@ -176,9 +176,9 @@ void Core::slotExecuteAfterStartup() {
// If the file was given with the polymesh option, open them as polymeshes.
if (commandLineFileNames_[i].second)
loadObject(typeId("PolyMesh"), QString::fromStdString(commandLineFileNames_[i].first));
loadObject(typeId("PolyMesh"), commandLineFileNames_[i].first);
else {
loadObject(QString::fromStdString(commandLineFileNames_[i].first));
loadObject(commandLineFileNames_[i].first);
}
}
......@@ -190,7 +190,7 @@ void Core::slotExecuteAfterStartup() {
// If we have scripting support, execute the scripts given at the commandline.
if ( scriptingSupport )
for ( uint i = 0 ; i < commandLineScriptNames_.size() ; ++i ) {
emit executeFileScript(QString::fromStdString(commandLineScriptNames_[i]));
emit executeFileScript(commandLineScriptNames_[i]);
}
// If we don't have a gui and we are not under remote control,
......
......@@ -54,7 +54,6 @@ set (directories
../Scripting
../Scripting/scriptPrototypes
../Scripting/scriptWrappers
../SimpleOpt
../widgets/aboutWidget
../widgets/addEmptyWidget
../widgets/loggerWidget
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -56,37 +56,6 @@ void CoreWidget::addCoreLicenseInfo() {
// Core License Information
// ======================================================================
// Simple opt used for parsing command line arguments across architectures
addAboutInfo("OpenFlipper uses SimpleOpt for platform independent command line parsing<br>"
"SimpleOpt is licensed under the MIT license ( see below)<br>"
"<br>"
"<b>Author:</b> Brodie Thiesfield [code at jellycan dot com]<br>"
"<b>Source:</b> http://code.jellycan.com/simpleopt/ <br>"
"<br>"
"The licence text below is the boilerplate \"<b>MIT Licence</b>\" used from:<br>"
"http://www.opensource.org/licenses/mit-license.php <br>"
"<br>"
"Copyright (c) 2006-2007, Brodie Thiesfield"
"<br>"
"Permission is hereby granted, free of charge, to any person obtaining a copy "
"of this software and associated documentation files (the \"Software\"), to "
"deal in the Software without restriction, including without limitation the "
"rights to use, copy, modify, merge, publish, distribute, sublicense, and/or "
"sell copies of the Software, and to permit persons to whom the Software is "
"furnished to do so, subject to the following conditions:<br><br>"
"The above copyright notice and this permission notice shall be included in "
"all copies or substantial portions of the Software."
"<br><br>"
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR "
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, "
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL "
"THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER "
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING "
"FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS "
"IN THE SOFTWARE."
,"SimpleOpt");
addAboutInfo("OpenFlipper uses Stackwalker for windows stack trace creation<br>"
"StackWalker is licensed under the BSD license ( see below)<br>"
"<br>"
......
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