annotate src/main.cc @ 316:180714442770

settings: clean up code
author Paper <paper@paper.us.eu.org>
date Tue, 11 Jun 2024 15:11:09 -0400
parents 34347fd2a2de
children b1f4d1867ab1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
1 #include "core/anime_db.h"
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
2 #include "core/session.h"
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 229
diff changeset
3 #include "core/strings.h"
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
4 #include "gui/window.h"
250
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
5 #include "services/anilist.h"
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
6
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
7 #include <QApplication>
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
8 #include <QLocale>
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
9 #include <QStyleFactory>
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 98
diff changeset
10 #include <QTranslator>
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
11
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 229
diff changeset
12 #include <iostream>
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 229
diff changeset
13
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
14 int main(int argc, char** argv) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
15 QApplication app(argc, argv);
250
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
16 app.setApplicationName("minori");
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
17 app.setApplicationDisplayName("Minori");
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 229
diff changeset
18 app.setAttribute(Qt::AA_DontShowIconsInMenus, true);
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
19
273
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
20 qRegisterMetaType<std::vector<std::string>>(); /* window.cc */
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
21 qRegisterMetaType<std::vector<int>>(); /* search.cc */
315
34347fd2a2de session: allow printing status messages
Paper <paper@paper.us.eu.org>
parents: 273
diff changeset
22 qRegisterMetaType<std::string>();
273
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
23
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
24 session.config.Load();
177
122fad646f81 anime/db: upgrade to c++17 style, make things easier to read
Paper <mrpapersonic@gmail.com>
parents: 175
diff changeset
25 Anime::db.LoadDatabaseFromDisk();
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
26
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
27 MainWindow window;
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
28
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
29 window.resize(941, 750);
11
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
30 window.setWindowTitle("Minori");
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
31 window.show();
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
32
315
34347fd2a2de session: allow printing status messages
Paper <paper@paper.us.eu.org>
parents: 273
diff changeset
33 /* do this before starting the app... */
34347fd2a2de session: allow printing status messages
Paper <paper@paper.us.eu.org>
parents: 273
diff changeset
34 session.SetMainWindow(&window);
34347fd2a2de session: allow printing status messages
Paper <paper@paper.us.eu.org>
parents: 273
diff changeset
35
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
36 return app.exec();
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
37 }