-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (25 loc) · 782 Bytes
/
main.cpp
File metadata and controls
34 lines (25 loc) · 782 Bytes
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
#include "wmainwindow.h"
#include "browbeaterapplication.h"
#include "platform_interface.hpp"
#include <QApplication>
#include <iostream>
int main(int argc, char *argv[])
{
BrowBeaterApplication a(argc, argv);
registerApplication(argv[0]);
std::shared_ptr< BrowserRegistrar > registrar = getBrowserRegistrar();
std::vector< std::shared_ptr< Browser > > browsers = registrar->listBrowsers();
for( auto const& browser : browsers )
{
a.getMainWindow().add_browser(browser);
}
std::vector< std::string const > urls;
for (int i = 1; i < argc; ++i) {
urls.push_back(std::string(argv[i]));
}
if (urls.size()) {
a.getMainWindow().set_urls(urls);
a.getMainWindow().show();
}
return a.exec();
}