Mercurial > minori
annotate src/main.cc @ 397:811697ad826a
http: do proper global init/cleanup of libcurl
this is done automagically using RAII
| author | Paper <paper@tflc.us> |
|---|---|
| date | Fri, 07 Nov 2025 08:39:24 -0500 |
| parents | 47c9f8502269 |
| children |
| rev | line source |
|---|---|
|
325
78929794e7d8
pages/seasons: run seasons search in a separate thread
Paper <paper@paper.us.eu.org>
parents:
317
diff
changeset
|
1 #include "core/anime.h" |
| 258 | 2 #include "core/anime_db.h" |
|
325
78929794e7d8
pages/seasons: run seasons search in a separate thread
Paper <paper@paper.us.eu.org>
parents:
317
diff
changeset
|
3 #include "core/date.h" |
| 10 | 4 #include "core/session.h" |
|
397
811697ad826a
http: do proper global init/cleanup of libcurl
Paper <paper@tflc.us>
parents:
369
diff
changeset
|
5 #include "core/http.h" |
|
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
229
diff
changeset
|
6 #include "core/strings.h" |
| 258 | 7 #include "gui/window.h" |
| 250 | 8 #include "services/anilist.h" |
| 9 | |
| 10 | 10 #include <QApplication> |
| 258 | 11 #include <QLocale> |
| 46 | 12 #include <QStyleFactory> |
| 108 | 13 #include <QTranslator> |
| 10 | 14 |
|
317
b1f4d1867ab1
services: VERY initial Kitsu support
Paper <paper@paper.us.eu.org>
parents:
315
diff
changeset
|
15 #include <cstdlib> |
|
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
229
diff
changeset
|
16 |
| 369 | 17 int main(int argc, char **argv) |
| 18 { | |
|
397
811697ad826a
http: do proper global init/cleanup of libcurl
Paper <paper@tflc.us>
parents:
369
diff
changeset
|
19 HTTP::Initializer http; |
|
811697ad826a
http: do proper global init/cleanup of libcurl
Paper <paper@tflc.us>
parents:
369
diff
changeset
|
20 |
| 10 | 21 QApplication app(argc, argv); |
| 250 | 22 app.setApplicationName("minori"); |
| 23 app.setApplicationDisplayName("Minori"); | |
|
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
229
diff
changeset
|
24 app.setAttribute(Qt::AA_DontShowIconsInMenus, true); |
| 10 | 25 |
|
273
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
26 qRegisterMetaType<std::vector<std::string>>(); /* window.cc */ |
| 369 | 27 qRegisterMetaType<std::vector<int>>(); /* search.cc */ |
|
315
34347fd2a2de
session: allow printing status messages
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
28 qRegisterMetaType<std::string>(); |
|
327
b5d6c27c308f
anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents:
325
diff
changeset
|
29 qRegisterMetaType<Anime::Season>(); |
|
273
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
30 |
| 10 | 31 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
|
32 Anime::db.LoadDatabaseFromDisk(); |
| 10 | 33 |
| 34 MainWindow window; | |
| 35 | |
| 36 window.resize(941, 750); | |
| 11 | 37 window.setWindowTitle("Minori"); |
| 10 | 38 window.show(); |
| 39 | |
|
315
34347fd2a2de
session: allow printing status messages
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
40 /* do this before starting the app... */ |
|
34347fd2a2de
session: allow printing status messages
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
41 session.SetMainWindow(&window); |
|
34347fd2a2de
session: allow printing status messages
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
42 |
| 10 | 43 return app.exec(); |
| 46 | 44 } |
