File: main.cpp

package info (click to toggle)
warzone2100 4.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 660,320 kB
  • sloc: cpp: 676,209; ansic: 391,201; javascript: 78,238; python: 16,632; php: 4,294; sh: 4,094; makefile: 2,629; lisp: 1,492; cs: 489; xml: 404; perl: 224; ruby: 156; java: 89
file content (29 lines) | stat: -rw-r--r-- 484 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <QtGui/QApplication>
#include <QFileInfo>
#include "statseditor.h"

int main(int argc, char *argv[])
{
	QApplication a(argc, argv);
	const char *path;
	if (argc <= 1)
	{
		// No args, look for default paths
		// TODO!
		qFatal("Need path to data directory");
	}
	else
	{
		path = argv[1];
	}
	// Verify path
	QFileInfo v(path);
	if (!v.exists() || !v.isDir())
	{
		qFatal("No such directory");
		// TODO, more testing!
	}
	StatsEditor w(path);
	w.show();
	return a.exec();
}