Falkon Develop
Cross-platform Qt-based web browser
qzcommon.h
Go to the documentation of this file.
1/* ============================================================
2* Falkon - Qt web browser
3* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
4*
5* This program is free software: you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation, either version 3 of the License, or
8* (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program. If not, see <http://www.gnu.org/licenses/>.
17* ============================================================ */
18#ifndef QZCOMMON_H
19#define QZCOMMON_H
20
21#include <QDebug>
22#include <QFlags>
23#include <QtWebEngineCore/QtWebEngineCoreVersion>
24
25#ifdef FALKON_SHAREDLIBRARY
26#define FALKON_EXPORT Q_DECL_EXPORT
27#else
28#define FALKON_EXPORT Q_DECL_IMPORT
29#endif
30
31#ifndef Q_UNLIKELY
32#define Q_UNLIKELY(x) x
33#endif
34
35#ifndef Q_LIKELY
36#define Q_LIKELY(x) x
37#endif
38
39#ifndef QSL
40#define QSL(x) QStringLiteral(x)
41#endif
42
43#ifndef QL1S
44#define QL1S(x) QLatin1String(x)
45#endif
46
47#ifndef QL1C
48#define QL1C(x) QLatin1Char(x)
49#endif
50
51namespace Qz
52{
53// Version of session.dat file
54extern const int sessionVersion;
55
56FALKON_EXPORT extern const char *APPNAME;
57FALKON_EXPORT extern const char *VERSION;
58FALKON_EXPORT extern const char *AUTHOR;
59FALKON_EXPORT extern const char *COPYRIGHT;
60FALKON_EXPORT extern const char *WWWADDRESS;
61FALKON_EXPORT extern const char *BUGSADDRESS;
62FALKON_EXPORT extern const char *WIKIADDRESS;
63
69};
70
87};
88
94};
95
102
110
111Q_DECLARE_FLAGS(NewTabPositionFlags, NewTabPositionFlag)
112Q_DECLARE_OPERATORS_FOR_FLAGS(Qz::NewTabPositionFlags)
113
114}
115
116#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
117#define DEFAULT_THEME_NAME QSL("windows")
118#elif defined(Q_OS_MACOS)
119#define DEFAULT_THEME_NAME QSL("mac")
120#elif defined(Q_OS_UNIX)
121#define DEFAULT_THEME_NAME QSL("linux")
122#else
123#define DEFAULT_THEME_NAME QSL("default")
124#endif
125
126#ifdef Q_OS_WIN
127#define DISABLE_CHECK_UPDATES false
128#else
129#define DISABLE_CHECK_UPDATES true
130#endif
131
132#define DEFAULT_CHECK_DEFAULTBROWSER false
133
134#ifdef Q_OS_WIN
135#define DEFAULT_DOWNLOAD_USE_NATIVE_DIALOG false
136#else
137#define DEFAULT_DOWNLOAD_USE_NATIVE_DIALOG true
138#endif
139
140#endif // QZCOMMON_H
Definition: qzcommon.cpp:22
ObjectName
Definition: qzcommon.h:89
@ ON_TabWidget
Definition: qzcommon.h:92
@ ON_TabBar
Definition: qzcommon.h:91
@ ON_BrowserWindow
Definition: qzcommon.h:93
@ ON_WebView
Definition: qzcommon.h:90
const int sessionVersion
Definition: qzcommon.cpp:23
CommandLineAction
Definition: qzcommon.h:71
@ CL_OpenUrl
Definition: qzcommon.h:73
@ CL_WMClass
Definition: qzcommon.h:86
@ CL_ToggleFullScreen
Definition: qzcommon.h:81
@ CL_OpenUrlInNewWindow
Definition: qzcommon.h:75
@ CL_StartNewInstance
Definition: qzcommon.h:83
@ CL_OpenUrlInCurrentTab
Definition: qzcommon.h:74
@ CL_NewWindow
Definition: qzcommon.h:79
@ CL_NewTab
Definition: qzcommon.h:78
@ CL_ShowDownloadManager
Definition: qzcommon.h:80
@ CL_StartWithProfile
Definition: qzcommon.h:76
@ CL_NoAction
Definition: qzcommon.h:72
@ CL_StartPrivateBrowsing
Definition: qzcommon.h:82
@ CL_ExitAction
Definition: qzcommon.h:85
@ CL_StartPortable
Definition: qzcommon.h:84
@ CL_StartWithoutAddons
Definition: qzcommon.h:77
FALKON_EXPORT const char * AUTHOR
Definition: qzcommon.cpp:27
FALKON_EXPORT const char * VERSION
Definition: qzcommon.cpp:26
FALKON_EXPORT const char * APPNAME
Definition: qzcommon.cpp:25
FALKON_EXPORT const char * BUGSADDRESS
Definition: qzcommon.cpp:30
FALKON_EXPORT const char * WIKIADDRESS
Definition: qzcommon.cpp:31
FALKON_EXPORT const char * WWWADDRESS
Definition: qzcommon.cpp:29
FALKON_EXPORT const char * COPYRIGHT
Definition: qzcommon.cpp:28
BrowserWindowType
Definition: qzcommon.h:64
@ BW_NewWindow
Definition: qzcommon.h:67
@ BW_OtherRestoredWindow
Definition: qzcommon.h:66
@ BW_FirstAppWindow
Definition: qzcommon.h:65
@ BW_MacFirstWindow
Definition: qzcommon.h:68
NewTabPositionFlag
Definition: qzcommon.h:96
@ NT_CleanSelectedTab
Definition: qzcommon.h:107
@ NT_NotSelectedTabAtTheEnd
Definition: qzcommon.h:105
@ NT_SelectedTabAtTheEnd
Definition: qzcommon.h:104
@ NT_SelectedTab
Definition: qzcommon.h:97
@ NT_CleanNotSelectedTab
Definition: qzcommon.h:108
@ NT_SelectedNewEmptyTab
Definition: qzcommon.h:103
@ NT_CleanSelectedTabAtTheEnd
Definition: qzcommon.h:106
@ NT_TabAtTheEnd
Definition: qzcommon.h:100
@ NT_CleanTab
Definition: qzcommon.h:99
@ NT_NewEmptyTab
Definition: qzcommon.h:101
@ NT_NotSelectedTab
Definition: qzcommon.h:98
#define FALKON_EXPORT
Definition: qzcommon.h:28