Skip to content

Commit e4f5161

Browse files
committed
Merge tag 'Release_1_8_11'
Release-1.8.11 Conflicts: src/code.l
2 parents 1899087 + a6d4f4d commit e4f5161

File tree

264 files changed

+11312
-6956
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+11312
-6956
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@
1313

1414
/doxygen_docs
1515
/doxygen.tag
16-
17-

.travis.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
language: cpp
22
compiler:
33
- gcc
4+
- clang
5+
46
before_install:
7+
- sudo apt-add-repository ppa:smspillaz/cmake-2.8.12 -y
8+
- sudo add-apt-repository ppa:texlive-backports/ppa -y
59
- sudo apt-get update -qq
6-
- sudo apt-get install -qq texlive texlive-extra-utils texlive-latex-extra libxml2-utils
7-
- wget -qO- http://www.cmake.org/files/v3.1/cmake-3.1.0-Linux-x86_64.tar.gz | tar xvz
10+
11+
install:
12+
- sudo apt-get install -qq texlive texlive-extra-utils texlive-latex-extra libxml2-utils
13+
- sudo apt-get install -qq cmake cmake-data
814

915
script:
1016
- mkdir build
1117
- cd build
12-
- ../cmake-3.1.0-Linux-x86_64/bin/cmake -G "Unix Makefiles" -Dbuild_doc=ON -Dbuild_wizard=ON ..
18+
- cmake -G "Unix Makefiles" -Dbuild_doc=ON -Dbuild_wizard=ON ..
1319
- make
14-
- make docs
1520
- make tests
21+
- make docs

CMakeLists.txt

+9-4
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ option(use_sqlite3 "Add support for sqlite3 output [experimental]." OFF)
2424
option(use_libclang "Add support for libclang parsing." OFF)
2525
option(win_static "Link with /MT in stead of /MD on windows" OFF)
2626
option(english_only "Only compile in support for the English language" OFF)
27+
option(force_qt4 "Forces doxywizard to build using Qt4 even if Qt5 is installed" OFF)
2728

2829
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
29-
set(SOURCE "${CMAKE_SOURCE_DIR}")
30+
set(TOP "${CMAKE_SOURCE_DIR}")
3031
include(version)
3132

3233
set(sqlite3 "0" CACHE INTERNAL "used in settings.h")
@@ -41,12 +42,15 @@ endif()
4142

4243
if (${CMAKE_SYSTEM} MATCHES "Darwin")
4344
set(CMAKE_CXX_FLAGS "-Wno-deprecated-register -mmacosx-version-min=10.5 ${CMAKE_CXX_FLAGS}")
45+
set(CMAKE_C_FLAGS "-Wno-deprecated-register -mmacosx-version-min=10.5 ${CMAKE_C_FLAGS}")
4446
find_library(CORESERVICES_LIB CoreServices)
4547
set(EXTRA_LIBS ${CORESERVICES_LIB})
4648
endif()
4749

4850
if (WIN32)
49-
set(ICONV_DIR "${CMAKE_SOURCE_DIR}/winbuild")
51+
if(NOT ICONV_DIR)
52+
set(ICONV_DIR "${CMAKE_SOURCE_DIR}/winbuild")
53+
endif()
5054
set(CMAKE_REQUIRED_DEFINITIONS "-DLIBICONV_STATIC")
5155
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # needed for language.cpp on 64bit
5256
add_definitions(-DLIBICONV_STATIC -D_CRT_SECURE_NO_WARNINGS)
@@ -67,8 +71,6 @@ include_directories(${ICONV_INCLUDE_DIR})
6771

6872

6973
#set(DOXYDOCS ${CMAKE_SOURCE_DIR}/doc CACHE INTERNAL "Path to doxygen docs")
70-
set(DOC_INSTALL_DIR "share/doc/packages/doxygen" CACHE STRING "Relative path where to install the documentation")
71-
set(EXAMPLE_DIR ${CMAKE_SOURCE_DIR}/examples)
7274
set(DOXYDOCS ${PROJECT_BINARY_DIR}/doc)
7375
set(ENV{DOXYGEN_DOCDIR} ${DOXYDOCS})
7476
set(GENERATED_SRC "${CMAKE_BINARY_DIR}/generated_src" CACHE INTERNAL "Stores generated files")
@@ -138,3 +140,6 @@ add_subdirectory(addon/doxywizard)
138140

139141
enable_testing()
140142
add_subdirectory(testing)
143+
144+
include(cmake/packaging.cmake) # set CPACK_xxxx properties
145+
include(CPack)

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.10
1+
1.8.11

addon/doxyapp/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ include_directories(
66
${CMAKE_SOURCE_DIR}/src
77
${CMAKE_SOURCE_DIR}/qtools
88
${ICONV_INCLUDE_DIR}
9+
${CLANG_INCLUDEDIR}
910
)
1011

1112
add_executable(doxyapp
@@ -21,6 +22,7 @@ ${ICONV_LIBRARIES}
2122
${CMAKE_THREAD_LIBS_INIT}
2223
${SQLITE3_LIBRARIES}
2324
${EXTRA_LIBS}
25+
${CLANG_LIBS}
2426
)
2527

2628
install(TARGETS doxyapp DESTINATION bin)

addon/doxywizard/CMakeLists.txt

+45-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
if (build_wizard)
22

3+
# search for Qt5
4+
if (NOT force_qt4)
5+
find_package(Qt5Core QUIET)
6+
if (Qt5Core_FOUND)
7+
message(STATUS "Using Qt5")
8+
find_package(Qt5 COMPONENTS Widgets Gui Xml)
9+
macro(qt_use_modules)
10+
qt5_use_modules(${ARGN})
11+
endmacro()
12+
macro(qt_wrap_cpp)
13+
qt5_wrap_cpp(${ARGN})
14+
endmacro()
15+
macro(qt_add_resources)
16+
qt5_add_resources(${ARGN})
17+
endmacro()
18+
endif()
19+
endif()
20+
# fallback to Qt4
21+
if (NOT Qt5Core_FOUND)
22+
if (NOT force_qt4)
23+
message(STATUS "Qt5 not found, searching for Qt4 instead...")
24+
else()
25+
message(STATUS "Using Qt4")
26+
endif()
27+
find_package(Qt4 REQUIRED COMPONENTS QtCore QtXml QtGui)
28+
macro(qt_use_modules)
29+
endmacro()
30+
macro(qt_wrap_cpp)
31+
qt4_wrap_cpp(${ARGN})
32+
endmacro()
33+
macro(qt_add_resources)
34+
qt4_add_resources(${ARGN})
35+
endmacro()
36+
endif()
37+
338
include_directories(
439
.
540
${CMAKE_SOURCE_DIR}/src
@@ -10,10 +45,10 @@ include_directories(
1045
set(GENERATED_SRC_WIZARD ${GENERATED_SRC}/doxywizard)
1146
file(MAKE_DIRECTORY ${GENERATED_SRC_WIZARD})
1247

13-
add_definitions(-DQT_ARCH_X86_64 -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DUNICODE)
14-
set(QT_USE_QTXML TRUE)
15-
find_package(Qt4 REQUIRED)
16-
include(${QT_USE_FILE})
48+
add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DUNICODE)
49+
if (NOT Qt5Core_FOUND)
50+
include(${QT_USE_FILE})
51+
endif()
1752

1853
# generate settings.h
1954
file(GENERATE OUTPUT ${GENERATED_SRC_WIZARD}/settings.h
@@ -41,9 +76,9 @@ OUTPUT ${GENERATED_SRC_WIZARD}/configdoc.cpp
4176
)
4277
set_source_files_properties(${GENERATED_SRC_WIZARD}/configdoc.cpp PROPERTIES GENERATED 1)
4378

44-
FLEX_TARGET(config_doxyw config_doxyw.l ${GENERATED_SRC_WIZARD}/config_doxyw.cpp COMPILE_FLAGS "-Pconfig_doxywYY")
79+
FLEX_TARGET(config_doxyw config_doxyw.l ${GENERATED_SRC_WIZARD}/config_doxyw.cpp COMPILE_FLAGS "$(LEX_FLAGS) -Pconfig_doxywYY")
4580

46-
QT4_WRAP_CPP(doxywizard_MOC
81+
qt_wrap_cpp(doxywizard_MOC
4782
doxywizard.h
4883
expert.h
4984
helplabel.h
@@ -54,9 +89,9 @@ inputstrlist.h
5489
wizard.h
5590
)
5691

57-
QT4_ADD_RESOURCES(doxywizard_RESOURCES_RCC doxywizard.qrc)
92+
qt_add_resources(doxywizard_RESOURCES_RCC doxywizard.qrc)
5893

59-
add_executable(doxywizard
94+
add_executable(doxywizard WIN32
6095
doxywizard.cpp
6196
expert.cpp
6297
wizard.cpp
@@ -71,8 +106,9 @@ ${GENERATED_SRC_WIZARD}/configdoc.cpp
71106
${doxywizard_MOC}
72107
${doxywizard_RESOURCES_RCC}
73108
)
109+
qt_use_modules(doxywizard Core Gui Widgets Xml)
74110
target_link_libraries(doxywizard
75-
${QT_LIBRARIES}
111+
${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}
76112
)
77113

78114
install(TARGETS doxywizard DESTINATION bin)

addon/doxywizard/config_doxyw.l

+40-31
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,16 @@
2020
*/
2121
#include "config.h"
2222
#include "input.h"
23-
#include <QtCore>
23+
24+
#include <QString>
25+
#include <QVariant>
26+
#include <QStack>
27+
#include <QTextCodec>
28+
#include <QByteArray>
29+
#include <QFileInfo>
30+
#include <QStringList>
31+
#include <QRegExp>
32+
#include <QTextStream>
2433

2534
#define YY_NO_UNISTD_H 1
2635

@@ -52,7 +61,7 @@ static QVariant *g_arg;
5261
static Input *g_curOption=0;
5362
static QString g_elemStr;
5463
static QTextCodec *g_codec = QTextCodec::codecForName("UTF-8");
55-
static QString g_codecName = QString::fromAscii("UTF-8");
64+
static QString g_codecName = QString::fromLatin1("UTF-8");
5665
static int g_lastState;
5766
static QByteArray g_tmpString;
5867

@@ -74,13 +83,13 @@ static int yyread(char *buf,int maxSize)
7483
}
7584
}
7685

77-
static QString warning_str = QString::fromAscii("warning: ");
78-
static QString error_str = QString::fromAscii("error: ");
86+
static QString warning_str = QString::fromLatin1("warning: ");
87+
static QString error_str = QString::fromLatin1("error: ");
7988

8089
void config_err(const char *fmt, ...)
8190
{
8291
QString msg = error_str;
83-
msg.append(QString::fromAscii(fmt));
92+
msg.append(QString::fromLatin1(fmt));
8493
va_list args;
8594
va_start(args, fmt);
8695
vfprintf(stderr, qPrintable(msg), args);
@@ -89,7 +98,7 @@ void config_err(const char *fmt, ...)
8998
void config_warn(const char *fmt, ...)
9099
{
91100
QString msg = warning_str;
92-
msg.append(QString::fromAscii(fmt));
101+
msg.append(QString::fromLatin1(fmt));
93102
va_list args;
94103
va_start(args, fmt);
95104
vfprintf(stderr, qPrintable(msg), args);
@@ -101,10 +110,10 @@ static void substEnvVarsInString(QString &s);
101110

102111
static void checkEncoding()
103112
{
104-
Input *option = g_options->value(QString::fromAscii("DOXYFILE_ENCODING"));
113+
Input *option = g_options->value(QString::fromLatin1("DOXYFILE_ENCODING"));
105114
if (option && option->value().toString()!=g_codecName)
106115
{
107-
QTextCodec *newCodec = QTextCodec::codecForName(option->value().toString().toAscii());
116+
QTextCodec *newCodec = QTextCodec::codecForName(option->value().toString().toLatin1());
108117
if (newCodec)
109118
{
110119
g_codec = newCodec;
@@ -115,7 +124,7 @@ static void checkEncoding()
115124

116125
static FILE *tryPath(const QString &path,const QString &fileName)
117126
{
118-
QString absName=!path.isEmpty() ? path+QString::fromAscii("/")+fileName : fileName;
127+
QString absName=!path.isEmpty() ? path+QString::fromLatin1("/")+fileName : fileName;
119128
QFileInfo fi(absName);
120129
if (fi.exists() && fi.isFile())
121130
{
@@ -144,7 +153,7 @@ static FILE *findFile(const QString &fileName)
144153
if (f) return f;
145154
}
146155
// try cwd if g_includePathList fails
147-
return tryPath(QString::fromAscii("."),fileName);
156+
return tryPath(QString::fromLatin1("."),fileName);
148157
}
149158

150159
static void readIncludeFile(const QString &incName)
@@ -160,8 +169,8 @@ static void readIncludeFile(const QString &incName)
160169
substEnvVarsInString(inc);
161170
inc = inc.trimmed();
162171
uint incLen = inc.length();
163-
if (inc.at(0)==QChar::fromAscii('"') &&
164-
inc.at(incLen-1)==QChar::fromAscii('"')) // strip quotes
172+
if (inc.at(0)==QChar::fromLatin1('"') &&
173+
inc.at(incLen-1)==QChar::fromLatin1('"')) // strip quotes
165174
{
166175
inc=inc.mid(1,incLen-2);
167176
}
@@ -383,7 +392,7 @@ static void readIncludeFile(const QString &incName)
383392

384393
static void substEnvVarsInString(QString &s)
385394
{
386-
static QRegExp re(QString::fromAscii("\\$\\([a-z_A-Z0-9]+\\)"));
395+
static QRegExp re(QString::fromLatin1("\\$\\([a-z_A-Z0-9]+\\)"));
387396
if (s.isEmpty()) return;
388397
int p=0;
389398
int i,l;
@@ -409,8 +418,8 @@ static void substEnvVarsInStrList(QStringList &sl)
409418
foreach (QString result, sl)
410419
{
411420
// an argument with quotes will have an extra space at the end, so wasQuoted will be TRUE.
412-
bool wasQuoted = (result.indexOf(QChar::fromAscii(' '))!=-1) ||
413-
(result.indexOf(QChar::fromAscii('\t'))!=-1);
421+
bool wasQuoted = (result.indexOf(QChar::fromLatin1(' '))!=-1) ||
422+
(result.indexOf(QChar::fromLatin1('\t'))!=-1);
414423
// here we strip the quote again
415424
substEnvVarsInString(result);
416425

@@ -430,33 +439,33 @@ static void substEnvVarsInStrList(QStringList &sl)
430439
{
431440
QChar c=0;
432441
// skip until start of new word
433-
while (i<l && ((c=result.at(i))==QChar::fromAscii(' ') || c==QChar::fromAscii('\t'))) i++;
442+
while (i<l && ((c=result.at(i))==QChar::fromLatin1(' ') || c==QChar::fromLatin1('\t'))) i++;
434443
p=i; // p marks the start index of the word
435444
// skip until end of a word
436-
while (i<l && ((c=result.at(i))!=QChar::fromAscii(' ') &&
437-
c!=QChar::fromAscii('\t') &&
438-
c!=QChar::fromAscii('"'))) i++;
445+
while (i<l && ((c=result.at(i))!=QChar::fromLatin1(' ') &&
446+
c!=QChar::fromLatin1('\t') &&
447+
c!=QChar::fromLatin1('"'))) i++;
439448
if (i<l) // not at the end of the string
440449
{
441-
if (c==QChar::fromAscii('"')) // word within quotes
450+
if (c==QChar::fromLatin1('"')) // word within quotes
442451
{
443452
p=i+1;
444453
for (i++;i<l;i++)
445454
{
446455
c=result.at(i);
447-
if (c==QChar::fromAscii('"')) // end quote
456+
if (c==QChar::fromLatin1('"')) // end quote
448457
{
449458
out += result.mid(p,i-p);
450459
p=i+1;
451460
break;
452461
}
453-
else if (c==QChar::fromAscii('\\')) // skip escaped stuff
462+
else if (c==QChar::fromLatin1('\\')) // skip escaped stuff
454463
{
455464
i++;
456465
}
457466
}
458467
}
459-
else if (c==QChar::fromAscii(' ') || c==QChar::fromAscii('\t')) // separator
468+
else if (c==QChar::fromLatin1(' ') || c==QChar::fromLatin1('\t')) // separator
460469
{
461470
out += result.mid(p,i-p);
462471
p=i+1;
@@ -529,7 +538,7 @@ bool parseConfig(
529538
void writeStringValue(QTextStream &t,QTextCodec *codec,const QString &s)
530539
{
531540
QChar c;
532-
bool needsEscaping=FALSE;
541+
bool needsEscaping=false;
533542
// convert the string back to it original encoding
534543
//QByteArray se = codec->fromUnicode(s);
535544
t.setCodec(codec);
@@ -538,20 +547,20 @@ void writeStringValue(QTextStream &t,QTextCodec *codec,const QString &s)
538547
{
539548
while (!(c=*p++).isNull() && !needsEscaping)
540549
{
541-
needsEscaping = (c==QChar::fromAscii(' ') ||
542-
c==QChar::fromAscii('\n') ||
543-
c==QChar::fromAscii('\t') ||
544-
c==QChar::fromAscii('"'));
550+
needsEscaping = (c==QChar::fromLatin1(' ') ||
551+
c==QChar::fromLatin1('\n') ||
552+
c==QChar::fromLatin1('\t') ||
553+
c==QChar::fromLatin1('"'));
545554
}
546555
if (needsEscaping)
547556
{
548557
t << "\"";
549558
p=s.data();
550559
while (!p->isNull())
551560
{
552-
if (*p ==QChar::fromAscii(' ') &&
553-
*(p+1)==QChar::fromAscii('\0')) break; // skip inserted space at the end
554-
if (*p ==QChar::fromAscii('"')) t << "\\"; // escape quotes
561+
if (*p ==QChar::fromLatin1(' ') &&
562+
*(p+1)==QChar::fromLatin1('\0')) break; // skip inserted space at the end
563+
if (*p ==QChar::fromLatin1('"')) t << "\\"; // escape quotes
555564
t << *p++;
556565
}
557566
t << "\"";

0 commit comments

Comments
 (0)