-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
45 lines (31 loc) · 1.07 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
#include "mainwindow.h"
#include <QApplication>
#include<QtDebug>
/*
int testmongo(){
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
qDebug()<<"ok";
mongocxx::instance inst;
try {
const auto uri = mongocxx::uri{mongocxx::uri::k_default_uri};
auto client = mongocxx::client{uri};
auto admin = client["admin"];
auto result = admin.run_command(make_document(kvp("isMaster", 1)));
std::cout << bsoncxx::to_json(result) << std::endl;
return EXIT_SUCCESS;
} catch (const std::exception& xcp) {
std::cout << "connection failed: " << xcp.what() << std::endl;
return EXIT_FAILURE;
}
}
*/
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
//qDebug()<<testmongo();
MainWindow w;
w.show();
return a.exec();
}