Added new debug flags. · epasveer/seer@d02eeab (original) (raw)

`@@ -6,6 +6,7 @@

`

6

6

`#include "SeerUtl.h"

`

7

7

`#include "QProcessInfo.h"

`

8

8

`#include <QtWidgets/QApplication>

`

``

9

`+

#include <QtWidgets/QStyleFactory>

`

9

10

`#include <QtGui/QIcon>

`

10

11

`#include <QtCore/QCommandLineParser>

`

11

12

`#include <QtCore/QCommandLineOption>

`

`@@ -14,6 +15,7 @@

`

14

15

`#include <QtCore/QTextStream>

`

15

16

`#include <QtCore/QObject>

`

16

17

`#include <QtCore/QDebug>

`

``

18

`+

#include <QtCore/QDirIterator>

`

17

19

`#include

`

18

20

``

19

21

`static void seerhelp() {

`

`@@ -121,9 +123,15 @@ int main (int argc, char* argv[]) {

`

121

123

` QCommandLineOption gdbArgumentsOption(QStringList() << "gdb-arguments", "", "gdbarguments");

`

122

124

` parser.addOption(gdbArgumentsOption);

`

123

125

``

124

``

`-

QCommandLineOption xxxdebugOption(QStringList() << "xxx");

`

``

126

`+

QCommandLineOption xxxdebugOption(QStringList() << "xxx-debug");

`

125

127

` parser.addOption(xxxdebugOption);

`

126

128

``

``

129

`+

QCommandLineOption xxxresourcesOption(QStringList() << "xxx-resources");

`

``

130

`+

parser.addOption(xxxresourcesOption);

`

``

131

+

``

132

`+

QCommandLineOption xxxstylesOption(QStringList() << "xxx-styles");

`

``

133

`+

parser.addOption(xxxstylesOption);

`

``

134

+

127

135

` QCommandLineOption helpOption(QStringList() << "h" << "help");

`

128

136

` parser.addOption(helpOption);

`

129

137

``

`@@ -149,6 +157,26 @@ int main (int argc, char* argv[]) {

`

149

157

`qDebug() << "SETTINGS" << settings.fileName();

`

150

158

` }

`

151

159

``

``

160

`+

if (parser.isSet(xxxresourcesOption)) {

`

``

161

`+

QTextStream(stdout) << "RESOURCES" << "\n";

`

``

162

`+

QDirIterator it(":", QDirIterator::Subdirectories);

`

``

163

`+

while (it.hasNext()) {

`

``

164

`+

QTextStream(stdout) << " " << it.next() << "\n";

`

``

165

`+

}

`

``

166

`+

QTextStream(stdout) << "ENDRESOURCES" << "\n";

`

``

167

`+

return 0;

`

``

168

`+

}

`

``

169

+

``

170

`+

if (parser.isSet(xxxstylesOption)) {

`

``

171

`+

QTextStream(stdout) << "STYLES" << "\n";

`

``

172

`+

QStringList styles = QStyleFactory::keys();

`

``

173

`+

for (auto style : styles) {

`

``

174

`+

QTextStream(stdout) << " " << style << "\n";

`

``

175

`+

}

`

``

176

`+

QTextStream(stdout) << "ENDSTYLES" << "\n";

`

``

177

`+

return 0;

`

``

178

`+

}

`

``

179

+

152

180

`// Get the positional arguments. (The ones at the end of the line - executable name and its arguments.

`

153

181

` QStringList positionalArguments = parser.positionalArguments();

`

154

182

``