forked from Olimiya/learnOSG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
71 lines (61 loc) · 1.98 KB
/
main.cpp
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//#include <QApplication>
//#include "OSGQt_Romaing/osg_romaingwindow.h"
//#include <QString>
//#include <QCoreApplication>
//#include <QSettings>
//#include <QDialog>
//#include <QDebug>
//#include <QFile>
//#include <QProcess>
////检测内存泄漏
////#include <vld.h>
// void writeRegedit(QString key, QString val)
//{
// QSettings Setting(QSettings::NativeFormat, QSettings::SystemScope,
// QCoreApplication::organizationName(), QCoreApplication::applicationName());
// Setting.setValue(key, val);
// }
// QString getRegedit(QString key)
//{
// QSettings Setting(QSettings::NativeFormat, QSettings::SystemScope,
// QCoreApplication::organizationName(), QCoreApplication::applicationName());
// QString val = Setting.value(key).toString();
// return val;
// }
// void removeRegedit(QString key)
//{
// QSettings Setting(QSettings::NativeFormat, QSettings::SystemScope,
// QCoreApplication::organizationName(), QCoreApplication::applicationName());
// Setting.remove(key);
// }
// QByteArray randomBinaryString(int length)
//{
// char *buf = new char[length];
// for (int i = 0; i < length; i++)
// buf[i] = rand() % 255 + 1;
// QByteArray temp(buf);
// return temp;
// }
// int main(int argc, char *argv[])
//{
// //管理员权限测试:
// //结果:使用.manifest + mt.exe附加管理员权限
// QApplication a(argc, argv);
// // QCoreApplication::setOrganizationName("South China University of Technology");
// // QCoreApplication::setApplicationName("Xiao Neng Ruan Jian");
// // writeRegedit("cd", "hhh");
// // auto val = getRegedit("cd");
// // removeRegedit("cd");
// // removeRegedit("cdKey");
// OSG_RomaingWindow w;
// w.show();
// // if(val.isNull())
// // {
// // }
// // else
// // {
// // QDialog *b = new QDialog;
// // b->show();
// // }
// return a.exec();
//}