src/main.h

Fri, 10 Jan 2014 11:09:38 +0200

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Fri, 10 Jan 2014 11:09:38 +0200
changeset 613
2d01590da286
parent 611
6679e47b019f
child 614
aac6f0021070
permissions
-rw-r--r--

- use QCoreApplication::applicationDirPath instead of a custom hack to get the application path
- write the build date in the application title
- other misc tweaks

541
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 /*
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2 * LDForge: LDraw parts authoring CAD
600
209e3f1f7b2c - updated copyright year. Best wishes for 2014!
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
3 * Copyright (C) 2013, 2014 Santeri Piippo
541
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4 *
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 * This program is free software: you can redistribute it and/or modify
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 * (at your option) any later version.
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 *
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 * GNU General Public License for more details.
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
14 *
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 */
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 // =============================================================================
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20 // This file is included one way or another in every source file of LDForge.
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21 // Stuff defined and included here is universally included.
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
22
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
23 #ifndef LDFORGE_MAIN_H
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
24 #define LDFORGE_MAIN_H
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
25
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
26 #include <stdio.h>
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
27 #include <stdlib.h>
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28 #include <stdint.h>
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
29 #include <stdarg.h>
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
30 #include <QString>
549
715d9a7f6598 Cleaned up download.cpp/.h, used PROPERTY. Added LIST_OPS to PROPERTY
Santeri Piippo <crimsondusk64@gmail.com>
parents: 541
diff changeset
31 #include <QTextFormat>
541
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
32
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
33 #include "property.h"
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
34 #include "config.h"
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
35
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
36 #define APPNAME "LDForge"
604
01bdac75994a - some cleanup
Santeri Piippo <crimsondusk64@gmail.com>
parents: 603
diff changeset
37 #define UNIXNAME "ldforge"
541
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
38 #define VERSION_MAJOR 0
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
39 #define VERSION_MINOR 2
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
40 #define VERSION_PATCH 999
604
01bdac75994a - some cleanup
Santeri Piippo <crimsondusk64@gmail.com>
parents: 603
diff changeset
41 #define BUILD_ID BUILD_INTERNAL
541
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
42
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
43 #define BUILD_INTERNAL 0
566
549c63863544 - removed the version monikers, new version is now just 0.3 instead of 0.3-alpha. BUILD_ID can now only be INTERNAL and RELEASE. It was way too complicated to my tastes.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 560
diff changeset
44 #define BUILD_RELEASE 1
541
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
45
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
46 // =============================================
613
2d01590da286 - use QCoreApplication::applicationDirPath instead of a custom hack to get the application path
Santeri Piippo <crimsondusk64@gmail.com>
parents: 611
diff changeset
47 #ifndef COMPILE_DATE
2d01590da286 - use QCoreApplication::applicationDirPath instead of a custom hack to get the application path
Santeri Piippo <crimsondusk64@gmail.com>
parents: 611
diff changeset
48 # error COMPILE_DATE is not set (qmake should have done this)
2d01590da286 - use QCoreApplication::applicationDirPath instead of a custom hack to get the application path
Santeri Piippo <crimsondusk64@gmail.com>
parents: 611
diff changeset
49 #endif // COMPILE_DATE
2d01590da286 - use QCoreApplication::applicationDirPath instead of a custom hack to get the application path
Santeri Piippo <crimsondusk64@gmail.com>
parents: 611
diff changeset
50
2d01590da286 - use QCoreApplication::applicationDirPath instead of a custom hack to get the application path
Santeri Piippo <crimsondusk64@gmail.com>
parents: 611
diff changeset
51 // =============================================
541
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
52 #ifdef DEBUG
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
53 # undef RELEASE
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
54 #endif // DEBUG
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
55
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
56 #ifdef RELEASE
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
57 # undef DEBUG
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
58 #endif // RELEASE
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
59
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
60 // =============================================
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
61 #define alias auto&
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
62 #define elif(A) else if (A)
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
63
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
64 // Null pointer
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
65 static const std::nullptr_t null = nullptr;
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
66
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
67 #ifdef WIN32
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
68 # define DIRSLASH "\\"
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
69 # define DIRSLASH_CHAR '\\'
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
70 #else // WIN32
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
71 # define DIRSLASH "/"
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
72 # define DIRSLASH_CHAR '/'
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
73 #endif // WIN32
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
74
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
75 #ifdef __GNUC__
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
76 #define FUNCNAME __PRETTY_FUNCTION__
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
77 #else
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
78 #define FUNCNAME __func__
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
79 #endif // __GNUC__
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
80
560
39085791128f - corrected history behavior. LDObject::clone() is now off-limits, createCopy() must be used instead. LDObject::deleteSelf() must be used to delete LDObjects (destructor is protected now)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 557
diff changeset
81 #ifdef IN_IDE_PARSER
39085791128f - corrected history behavior. LDObject::clone() is now off-limits, createCopy() must be used instead. LDObject::deleteSelf() must be used to delete LDObjects (destructor is protected now)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 557
diff changeset
82 void dlog(void, ...) {}
39085791128f - corrected history behavior. LDObject::clone() is now off-limits, createCopy() must be used instead. LDObject::deleteSelf() must be used to delete LDObjects (destructor is protected now)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 557
diff changeset
83 #else
39085791128f - corrected history behavior. LDObject::clone() is now off-limits, createCopy() must be used instead. LDObject::deleteSelf() must be used to delete LDObjects (destructor is protected now)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 557
diff changeset
84 # ifdef DEBUG
606
3dd6f343ec06 - removed the 'str' typedef, use QString directly
Santeri Piippo <crimsondusk64@gmail.com>
parents: 604
diff changeset
85 # define dlog(...) log (QString (__PRETTY_FUNCTION__) + ": " __VA_ARGS__)
560
39085791128f - corrected history behavior. LDObject::clone() is now off-limits, createCopy() must be used instead. LDObject::deleteSelf() must be used to delete LDObjects (destructor is protected now)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 557
diff changeset
86 # else
39085791128f - corrected history behavior. LDObject::clone() is now off-limits, createCopy() must be used instead. LDObject::deleteSelf() must be used to delete LDObjects (destructor is protected now)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 557
diff changeset
87 # define dlog(...)
39085791128f - corrected history behavior. LDObject::clone() is now off-limits, createCopy() must be used instead. LDObject::deleteSelf() must be used to delete LDObjects (destructor is protected now)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 557
diff changeset
88 # endif // DEBUG
39085791128f - corrected history behavior. LDObject::clone() is now off-limits, createCopy() must be used instead. LDObject::deleteSelf() must be used to delete LDObjects (destructor is protected now)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 557
diff changeset
89 #endif // IN_IDE_PARSER
39085791128f - corrected history behavior. LDObject::clone() is now off-limits, createCopy() must be used instead. LDObject::deleteSelf() must be used to delete LDObjects (destructor is protected now)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 557
diff changeset
90
541
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
91 // Replace assert with a version that shows a GUI dialog if possible.
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
92 // On Windows I just can't get the actual error messages otherwise.
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
93 void assertionFailure (const char* file, int line, const char* funcname, const char* expr);
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
94
611
6679e47b019f - configuration is now always situated and read from the application working directory
Santeri Piippo <crimsondusk64@gmail.com>
parents: 606
diff changeset
95 #undef assert
541
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
96
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
97 #ifdef DEBUG
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
98 # define assert(N) { ((N) ? (void) 0 : assertionFailure (__FILE__, __LINE__, FUNCNAME, #N)); }
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
99 #else
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
100 # define assert(N) {}
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
101 #endif // DEBUG
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
102
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
103 // Version string identifier
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
104 QString versionString();
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
105 QString fullVersionString();
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
106
549
715d9a7f6598 Cleaned up download.cpp/.h, used PROPERTY. Added LIST_OPS to PROPERTY
Santeri Piippo <crimsondusk64@gmail.com>
parents: 541
diff changeset
107 #define properties private
715d9a7f6598 Cleaned up download.cpp/.h, used PROPERTY. Added LIST_OPS to PROPERTY
Santeri Piippo <crimsondusk64@gmail.com>
parents: 541
diff changeset
108 #define typedefs public
570
e29a2ab838df - fixed minor goofup with for_axis
Santeri Piippo <crimsondusk64@gmail.com>
parents: 566
diff changeset
109 #define for_axes(AX) for (const Axis AX : std::initializer_list<const Axis> ({X, Y, Z}))
549
715d9a7f6598 Cleaned up download.cpp/.h, used PROPERTY. Added LIST_OPS to PROPERTY
Santeri Piippo <crimsondusk64@gmail.com>
parents: 541
diff changeset
110
541
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
111 // -----------------------------------------------------------------------------
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
112 #ifdef IN_IDE_PARSER // KDevelop workarounds:
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
113 # error IN_IDE_PARSER is defined (this code is only for KDevelop workarounds)
613
2d01590da286 - use QCoreApplication::applicationDirPath instead of a custom hack to get the application path
Santeri Piippo <crimsondusk64@gmail.com>
parents: 611
diff changeset
114 # define COMPILE_DATE "14-01-10 10:31:09"
541
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
115
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
116 # ifndef va_start
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
117 # define va_start(va, arg)
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
118 # endif // va_start
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
119
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
120 # ifndef va_end
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
121 # define va_end(va)
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
122 # endif // va_end
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
123
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
124 static const char* __func__ = ""; // Current function name
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
125 typedef void FILE; // :|
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
126 #endif // IN_IDE_PARSER
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
127
0e38beeb050a - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
128 #endif // LDFORGE_MAIN_H

mercurial