Compare commits
3 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
e857397ca0 | |
|
|
e8875da896 | |
|
|
ada2b6fa1b |
|
|
@ -1,3 +1,3 @@
|
|||
EXCLUDE = addon cmake doc examples jquery templates testing deps/iconv_winbuild src/logos.cpp src/lodepng.cpp
|
||||
FILE_PATTERNS = *.h *.cpp *.md
|
||||
USE_MDFILE_AS_MAINPAGE = src/doxygen.md
|
||||
USE_MDFILE_AS_MAINPAGE = src/analyze.md
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@
|
|||
*.orig
|
||||
|
||||
*.pro
|
||||
/packages/rpm/doxygen.spec
|
||||
/packages/rpm/analyze.spec
|
||||
*.idb
|
||||
*.pdb
|
||||
|
||||
/doxygen_docs
|
||||
/doxygen.tag
|
||||
/analyze_docs
|
||||
/analyze.tag
|
||||
/build*
|
||||
/qtools_docs
|
||||
/QGGools_docs
|
||||
/warnings.log
|
||||
|
||||
tags
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: doxygen
|
||||
github: analyze
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
name: Report a bug or issue
|
||||
about: Create a report to help us improve doxygen
|
||||
about: Create a report to help us improve analyze
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
|
@ -15,16 +15,16 @@ If useful, add screenshots to help explain your problem.
|
|||
|
||||
**To Reproduce**
|
||||
Attach a self contained example that allows us to reproduce the problem.
|
||||
Such an example typically exist of some source code (can be dummy code) and a doxygen configuration file used (you can strip it using `doxygen -s -u`). After you verified the example demonstrates the problem, put it in a zip (or tarball) and attach it to the bug report. Try to avoid linking to external sources, since they might disappear in the future.
|
||||
Such an example typically exist of some source code (can be dummy code) and a analyze configuration file used (you can strip it using `analyze -s -u`). After you verified the example demonstrates the problem, put it in a zip (or tarball) and attach it to the bug report. Try to avoid linking to external sources, since they might disappear in the future.
|
||||
|
||||
**Expected behavior**
|
||||
Describe what you would have expected or think is correct.
|
||||
|
||||
**Version**
|
||||
Mention the version of doxygen used (output of `doxygen --version`) and the platform on which you run doxygen (e.g. Windows 10, 64 bit). If you run doxygen under Linux please also mention the name and version of the distribution used (output of `lsb_release -a`) and mention if you compiled doxygen yourself or that you use a binary that comes with the distribution or from the doxygen website.
|
||||
Mention the version of analyze used (output of `analyze --version`) and the platform on which you run analyze (e.g. Windows 10, 64 bit). If you run analyze under Linux please also mention the name and version of the distribution used (output of `lsb_release -a`) and mention if you compiled analyze yourself or that you use a binary that comes with the distribution or from the analyze website.
|
||||
|
||||
**Stack trace**
|
||||
If you encounter a crash and can build doxygen from sources yourself with debug info (`-DCMAKE_BUILD_TYPE=Debug`), a stack trace can be very helpful (especially if it is not possible to capture the problem in a small example that can be shared).
|
||||
If you encounter a crash and can build analyze from sources yourself with debug info (`-DCMAKE_BUILD_TYPE=Debug`), a stack trace can be very helpful (especially if it is not possible to capture the problem in a small example that can be shared).
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
name: CMake Build for Doxygen
|
||||
name: CMake Build for analyze
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ jobs:
|
|||
build_gen: "NMake Makefiles"
|
||||
}
|
||||
steps:
|
||||
- name: Checkout doxygen
|
||||
- name: Checkout analyze
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
|
@ -268,20 +268,20 @@ jobs:
|
|||
refreshenv
|
||||
if: matrix.config.os == 'windows-latest'
|
||||
|
||||
- name: Install Qt 6.8
|
||||
uses: jdpurcell/install-qt-action@v5
|
||||
- name: Install QGG 6.8
|
||||
uses: jdpurcell/install-QGG-action@v5
|
||||
with:
|
||||
version: 6.8.*
|
||||
if: matrix.config.os == 'ubuntu-24.04-arm'
|
||||
|
||||
- name: Install Qt 6.2
|
||||
uses: jdpurcell/install-qt-action@v5
|
||||
- name: Install QGG 6.2
|
||||
uses: jdpurcell/install-QGG-action@v5
|
||||
with:
|
||||
version: 6.2.*
|
||||
if: startsWith(matrix.config.os,'macos-')
|
||||
|
||||
- name: Install Qt 5
|
||||
uses: jdpurcell/install-qt-action@v5
|
||||
- name: Install QGG 5
|
||||
uses: jdpurcell/install-QGG-action@v5
|
||||
with:
|
||||
version: 5.*
|
||||
if: startsWith(matrix.config.os,'macos-')!=true && matrix.config.os != 'ubuntu-24.04-arm'
|
||||
|
|
@ -389,7 +389,7 @@ jobs:
|
|||
|
||||
execute_process(
|
||||
COMMAND
|
||||
cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf --man"
|
||||
cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --OHp --docbook --rtf --man"
|
||||
cmake --build build --target tests
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
|
|
@ -405,7 +405,7 @@ jobs:
|
|||
|
||||
execute_process(
|
||||
COMMAND
|
||||
cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf --man --pdf"
|
||||
cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --OHp --docbook --rtf --man --pdf"
|
||||
cmake --build build --target tests
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
|
|
@ -436,7 +436,7 @@ jobs:
|
|||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "Latex documentation artifacts"
|
||||
path: build/latex/doxygen_manual.pdf
|
||||
path: build/latex/analyze_manual.pdf
|
||||
if: matrix.config.name == 'Ubuntu Latest GCC Release (Intel)'
|
||||
|
||||
- name: Generate Internal documentation
|
||||
|
|
@ -455,8 +455,8 @@ jobs:
|
|||
uses: peaceiris/actions-gh-pages@v4
|
||||
with:
|
||||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||
external_repository: doxygen/doxygen-docs
|
||||
publish_dir: build/doxygen_docs/html
|
||||
external_repository: analyze/analyze-docs
|
||||
publish_dir: build/analyze_docs/html
|
||||
force_orphan: true
|
||||
if: ${{ github.event_name == 'push' && matrix.config.name == 'Ubuntu Latest GCC Release (Intel)' }}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
name: Coverity for doxygen
|
||||
name: Coverity for analyze
|
||||
|
||||
# Just for tests
|
||||
#on: [push, pull_request]
|
||||
|
|
@ -39,12 +39,12 @@ jobs:
|
|||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
steps:
|
||||
- name: Checkout doxygen
|
||||
- name: Checkout analyze
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download Coverity
|
||||
run: |
|
||||
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=doxygen%2Fdoxygen" -O coverity_tool.tgz
|
||||
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=analyze%2Fanalyze" -O coverity_tool.tgz
|
||||
mkdir cov-scan
|
||||
tar ax -f coverity_tool.tgz --strip-components=1 -C cov-scan
|
||||
env:
|
||||
|
|
@ -55,7 +55,7 @@ jobs:
|
|||
echo "$(pwd)/cov-scan/bin" >> $GITHUB_PATH
|
||||
echo "NPROC=$(getconf _NPROCESSORS_ONLN)" >> $GITHUB_ENV
|
||||
|
||||
- name: Configure doxygen
|
||||
- name: Configure analyze
|
||||
run: |
|
||||
mkdir build
|
||||
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
|
||||
|
|
@ -73,7 +73,7 @@ jobs:
|
|||
--form file=@cov-scan.tgz \
|
||||
--form version="$(git rev-parse HEAD)" \
|
||||
--form description="Automatic GHA scan" \
|
||||
'https://scan.coverity.com/builds?project=doxygen%2Fdoxygen'
|
||||
'https://scan.coverity.com/builds?project=analyze%2Fanalyze'
|
||||
env:
|
||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@
|
|||
*.orig
|
||||
|
||||
*.pro
|
||||
/packages/rpm/doxygen.spec
|
||||
/packages/rpm/analyze.spec
|
||||
*.idb
|
||||
*.pdb
|
||||
|
||||
/doxygen_docs
|
||||
/doxygen.tag
|
||||
/analyze_docs
|
||||
/analyze.tag
|
||||
/build*
|
||||
/qtools_docs
|
||||
/QGGools_docs
|
||||
/warnings.log
|
||||
|
||||
tags
|
||||
|
|
|
|||
|
|
@ -8,18 +8,18 @@
|
|||
# for any purpose. It is provided "as is" without express or implied warranty.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# Documents produced by Doxygen are derivative works derived from the
|
||||
# Documents produced by analyze are derivative works derived from the
|
||||
# input used in their production; they are not affected by this license.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(doxygen)
|
||||
project(analyze)
|
||||
|
||||
option("ENABLE_CLANG_TIDY" "Enable static analysis with clang-tidy" OFF)
|
||||
|
||||
option(build_wizard "Build the GUI frontend for doxygen." OFF)
|
||||
option(build_app "Example showing how to embed doxygen in an application." OFF)
|
||||
option(build_wizard "Build the GUI frontend for analyze." OFF)
|
||||
option(build_app "Example showing how to embed analyze in an application." OFF)
|
||||
option(build_parse "Parses source code and dumps the dependencies between the code elements." OFF)
|
||||
option(build_search "Build external search tools (doxysearch and doxyindexer)" OFF)
|
||||
option(build_search "Build external search tools (analzsearch and analzindexer)" OFF)
|
||||
option(build_doc "Build user manual (HTML and PDF)" OFF)
|
||||
option(build_doc_chm "Build user manual (CHM)" OFF)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
|
|
@ -31,21 +31,21 @@ option(use_sys_fmt "Use system fmt library instead of the one bundled." OFF)
|
|||
option(use_sys_sqlite3 "Use system sqlite3 library instead of the one bundled." OFF)
|
||||
option(static_libclang "Link to a statically compiled version of LLVM/libclang." OFF)
|
||||
option(win_static "Link with /MT in stead of /MD on windows" OFF)
|
||||
option(enable_console "Enable that executables on Windows get the CONSOLE bit set for the doxywizard executable [development]" OFF)
|
||||
option(enable_console "Enable that executables on Windows get the CONSOLE bit set for the analzwizard executable [development]" OFF)
|
||||
option(enable_coverage "Enable coverage reporting for gcc/clang [development]" OFF)
|
||||
option(enable_tracing "Enable tracing option in release builds [development]" OFF)
|
||||
option(enable_lex_debug "Enable debugging info for lexical scanners in release builds [development]" OFF)
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
set(force_qt CACHE INTERNAL "Forces doxywizard to build using the specified major version, this can be Qt5 or Qt6")
|
||||
set_property(CACHE force_qt PROPERTY STRINGS OFF Qt6 Qt5)
|
||||
set(force_QGG CACHE INTERNAL "Forces analzwizard to build using the specified major version, this can be QGG5 or QGG6")
|
||||
set_property(CACHE force_QGG PROPERTY STRINGS OFF QGG6 QGG5)
|
||||
|
||||
SET(enlarge_lex_buffers "262144" CACHE INTERNAL "Sets the lex input and read buffers to the specified size")
|
||||
|
||||
if(enable_coverage)
|
||||
if ("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
|
||||
message(FATAL_ERROR "Doxygen cannot be generated in-place, the build directory (${PROJECT_BINARY_DIR}) has to differ from the doxygen main directory (${PROJECT_SOURCE_DIR})\nPlease don't forget to remove the already created file 'CMakeCache.txt' and the directory 'CMakeFiles'!")
|
||||
message(FATAL_ERROR "analyze cannot be generated in-place, the build directory (${PROJECT_BINARY_DIR}) has to differ from the analyze main directory (${PROJECT_SOURCE_DIR})\nPlease don't forget to remove the already created file 'CMakeCache.txt' and the directory 'CMakeFiles'!")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ if (use_sys_sqlite3)
|
|||
find_package(SQLite3 REQUIRED)
|
||||
endif()
|
||||
if (build_wizard)
|
||||
if (NOT force_qt STREQUAL "Qt5")
|
||||
if (NOT force_QGG STREQUAL "QGG5")
|
||||
if (CMAKE_SYSTEM MATCHES "Darwin")
|
||||
set(MACOS_VERSION_MIN 10.15)
|
||||
endif()
|
||||
|
|
@ -240,7 +240,7 @@ find_program(DOT NAMES dot)
|
|||
find_package(Python REQUIRED)
|
||||
find_package(FLEX REQUIRED)
|
||||
if (FLEX_VERSION VERSION_LESS 2.5.37)
|
||||
message(SEND_ERROR "Doxygen requires at least flex version 2.5.37 (installed: ${FLEX_VERSION})")
|
||||
message(SEND_ERROR "analyze requires at least flex version 2.5.37 (installed: ${FLEX_VERSION})")
|
||||
endif()
|
||||
if (FLEX_VERSION VERSION_LESS 2.6.0)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dregister=")
|
||||
|
|
@ -250,7 +250,7 @@ if (FLEX_VERSION VERSION_LESS 2.6.0)
|
|||
endif()
|
||||
find_package(BISON REQUIRED)
|
||||
if (BISON_VERSION VERSION_LESS 2.7)
|
||||
message(SEND_ERROR "Doxygen requires at least bison version 2.7 (installed: ${BISON_VERSION})")
|
||||
message(SEND_ERROR "analyze requires at least bison version 2.7 (installed: ${BISON_VERSION})")
|
||||
endif()
|
||||
find_package(Threads)
|
||||
find_package(Sanitizers)
|
||||
|
|
@ -263,9 +263,9 @@ find_package(Iconv REQUIRED)
|
|||
include_directories(${Iconv_INCLUDE_DIRS})
|
||||
|
||||
|
||||
#set(DOXYDOCS ${PROJECT_SOURCE_DIR}/doc CACHE INTERNAL "Path to doxygen docs")
|
||||
set(DOXYDOCS ${PROJECT_BINARY_DIR}/doc)
|
||||
set(ENV{DOXYGEN_DOCDIR} ${DOXYDOCS})
|
||||
#set(analzDOCS ${PROJECT_SOURCE_DIR}/doc CACHE INTERNAL "Path to analyze docs")
|
||||
set(analzDOCS ${PROJECT_BINARY_DIR}/doc)
|
||||
set(ENV{analyze_DOCDIR} ${analzDOCS})
|
||||
set(GENERATED_SRC "${PROJECT_BINARY_DIR}/generated_src" CACHE INTERNAL "Stores generated files")
|
||||
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
|
||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y \
|
|||
bison \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /doxygen
|
||||
WORKDIR /analyze
|
||||
COPY . .
|
||||
|
||||
RUN mkdir build \
|
||||
|
|
@ -22,6 +22,6 @@ FROM ubuntu:jammy
|
|||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
graphviz \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=builder /doxygen/build/bin/doxygen /usr/local/bin/
|
||||
WORKDIR /doxygen
|
||||
ENTRYPOINT ["doxygen"]
|
||||
COPY --from=builder /analyze/build/bin/analyze /usr/local/bin/
|
||||
WORKDIR /analyze
|
||||
ENTRYPOINT ["analyze"]
|
||||
|
|
|
|||
4
INSTALL
|
|
@ -1,7 +1,7 @@
|
|||
DOXYGEN
|
||||
analyze
|
||||
|
||||
Please read the installation section of the manual
|
||||
(https://www.doxygen.nl/manual/install.html) for instructions.
|
||||
(https://www.analyze.nl/manual/install.html) for instructions.
|
||||
|
||||
--------
|
||||
Dimitri van Heesch
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
This short howto explains how to add support for a new language to Doxygen:
|
||||
This short howto explains how to add support for a new language to analyze:
|
||||
|
||||
Just follow these steps:
|
||||
|
||||
1) Tell me which language you want to add support for. If no one else
|
||||
is already working on support for that language, you will be
|
||||
assigned as the maintainer for the language. I'll create a
|
||||
list on Doxygen's homepage, so everyone knows who is doing what.
|
||||
list on analyze's homepage, so everyone knows who is doing what.
|
||||
2) Edit src/config.xml:
|
||||
- find the <option> with id='OUTPUT_LANGUAGE'
|
||||
- add a new value with your language and an optional description:
|
||||
|
|
@ -43,7 +43,7 @@ Just follow these steps:
|
|||
|
||||
7) Now you can use OUTPUT_LANGUAGE = your_language_name
|
||||
in the config file to generate output in your language.
|
||||
8) Send translator_xx.h to me so I can add it to doxygen.
|
||||
8) Send translator_xx.h to me so I can add it to analyze.
|
||||
Send also your name and e-mail address to be included in the
|
||||
maintainers.txt list.
|
||||
|
||||
|
|
|
|||
68
README.md
|
|
@ -1,68 +0,0 @@
|
|||
Doxygen
|
||||
===============
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9HHLRBCC8B2B8)
|
||||
|
||||
Doxygen is the de facto standard tool for generating documentation from
|
||||
annotated C++ sources, but it also supports other popular programming
|
||||
languages such as C, Objective-C, C#, PHP, Java, Python, IDL
|
||||
(Corba, Microsoft, and UNO/OpenOffice flavors), Fortran,
|
||||
and to some extent D. Doxygen also supports the hardware description language VHDL.
|
||||
|
||||
Doxygen can help you in three ways:
|
||||
|
||||
1. It can generate an on-line documentation browser (in HTML) and/or an
|
||||
off-line reference manual (in LaTeX) from a set of documented source files.
|
||||
There is also support for generating output in RTF (MS-Word), PostScript,
|
||||
hyperlinked PDF, compressed HTML, DocBook and Unix man pages.
|
||||
The documentation is extracted directly from the sources, which makes
|
||||
it much easier to keep the documentation consistent with the source code.
|
||||
2. You can configure doxygen to extract the code structure from undocumented
|
||||
source files. This is very useful to quickly find your way in large
|
||||
source distributions. Doxygen can also visualize the relations between
|
||||
the various elements by means of include dependency graphs, inheritance
|
||||
diagrams, and collaboration diagrams, which are all generated automatically.
|
||||
3. You can also use doxygen for creating normal documentation (as I did for
|
||||
the doxygen user manual and doxygen web-site).
|
||||
|
||||
Download
|
||||
---------
|
||||
The latest binaries and source of Doxygen can be downloaded from:
|
||||
* https://www.doxygen.nl/
|
||||
|
||||
Developers
|
||||
---------
|
||||
* Linux & Windows and MacOS Build Status: <a href="https://github.com/doxygen/doxygen/actions"><img alt="Github Actions Build Status" src="https://github.com/doxygen/doxygen/workflows/CMake%20Build%20for%20Doxygen/badge.svg"></a>
|
||||
|
||||
* Coverity Scan Build Status: <a href="https://scan.coverity.com/projects/2860"> <img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/2860/badge.svg"/> </a>
|
||||
|
||||
* Doxygen's <a href="https://doxygen.github.io/doxygen-docs/">internal source code documentation</a>
|
||||
|
||||
* Install: Please read the installation section of the manual (https://www.doxygen.nl/manual/install.html)
|
||||
|
||||
* Project stats: https://www.openhub.net/p/doxygen
|
||||
|
||||
Issues, bugs, requests, ideas
|
||||
----------------------------------
|
||||
Use the [issue](https://github.com/doxygen/doxygen/issues) tracker to report bugs.
|
||||
|
||||
Comms
|
||||
----------------------------------
|
||||
### Mailing Lists ###
|
||||
|
||||
There are three mailing lists:
|
||||
|
||||
* doxygen-announce@lists.sourceforge.net - Announcement of new releases only
|
||||
* doxygen-users@lists.sourceforge.net - for doxygen users
|
||||
* doxygen-develop@lists.sourceforge.net - for doxygen developers
|
||||
* To subscribe follow the link to
|
||||
* https://sourceforge.net/projects/doxygen/
|
||||
|
||||
Source Code
|
||||
----------------------------------
|
||||
In May 2013, Doxygen moved from
|
||||
subversion to git hosted at GitHub
|
||||
* https://github.com/doxygen/doxygen
|
||||
|
||||
Enjoy,
|
||||
|
||||
Dimitri van Heesch (doxygen at gmail.com)
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
add_subdirectory(doxmlparser)
|
||||
|
||||
if (build_app)
|
||||
add_subdirectory(doxyapp)
|
||||
add_subdirectory(analzapp)
|
||||
endif ()
|
||||
|
||||
if (build_parse)
|
||||
add_subdirectory(doxyparse)
|
||||
add_subdirectory(analzparse)
|
||||
endif ()
|
||||
|
||||
if (build_search)
|
||||
add_subdirectory(doxysearch)
|
||||
add_subdirectory(analzsearch)
|
||||
endif ()
|
||||
|
||||
if (build_wizard)
|
||||
add_subdirectory(doxywizard)
|
||||
add_subdirectory(analzwizard)
|
||||
endif ()
|
||||
|
|
|
|||
|
|
@ -8,21 +8,21 @@ include_directories(
|
|||
${CLANG_INCLUDEDIR}
|
||||
)
|
||||
|
||||
add_executable(doxyapp
|
||||
doxyapp.cpp
|
||||
${PROJECT_SOURCE_DIR}/templates/icon/doxygen.rc
|
||||
add_executable(analzapp
|
||||
analzapp.cpp
|
||||
${PROJECT_SOURCE_DIR}/templates/icon/analyze.rc
|
||||
)
|
||||
include(ApplyEditbin)
|
||||
apply_editbin(doxyapp console)
|
||||
add_sanitizers(doxyapp)
|
||||
apply_editbin(analzapp console)
|
||||
add_sanitizers(analzapp)
|
||||
|
||||
if (use_libclang)
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
find_package(Clang REQUIRED CONFIG)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_features(doxyapp PRIVATE cxx_alignof)
|
||||
target_compile_features(analzapp PRIVATE cxx_alignof)
|
||||
if (use_libc++)
|
||||
target_compile_options(doxyapp PRIVATE -stdlib=libc++)
|
||||
target_compile_options(analzapp PRIVATE -stdlib=libc++)
|
||||
endif()
|
||||
endif()
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
|
|
@ -30,21 +30,21 @@ if (use_libclang)
|
|||
if (static_libclang)
|
||||
set(CLANG_LIBS libclang clangTooling)
|
||||
else() # dynamically linked version of clang
|
||||
llvm_config(doxymain USE_SHARED support)
|
||||
llvm_config(analzmain USE_SHARED support)
|
||||
set(CLANG_LIBS libclang clang-cpp)
|
||||
endif()
|
||||
target_compile_definitions(doxyapp PRIVATE ${LLVM_DEFINITIONS})
|
||||
target_compile_definitions(analzapp PRIVATE ${LLVM_DEFINITIONS})
|
||||
endif()
|
||||
|
||||
target_link_libraries(doxyapp
|
||||
doxymain
|
||||
target_link_libraries(analzapp
|
||||
analzmain
|
||||
md5
|
||||
sqlite3
|
||||
xml
|
||||
lodepng
|
||||
mscgen
|
||||
doxygen_version
|
||||
doxycfg
|
||||
analyze_version
|
||||
analzcfg
|
||||
vhdlparser
|
||||
${Iconv_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
|
|
@ -54,4 +54,4 @@ ${CLANG_LIBS}
|
|||
${COVERAGE_LINKER_FLAGS}
|
||||
)
|
||||
|
||||
install(TARGETS doxyapp DESTINATION bin)
|
||||
install(TARGETS analzapp DESTINATION bin)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
This directory contains an example of how to use doxygen as
|
||||
an "source parsing engine" in an application. It shows how to configure doxygen
|
||||
from the application and shows how to run doxygen without generating output.
|
||||
This directory contains an example of how to use analyze as
|
||||
an "source parsing engine" in an application. It shows how to configure analyze
|
||||
from the application and shows how to run analyze without generating output.
|
||||
Practically, it allows you to extract the symbols found in the source code.
|
||||
|
||||
Note that if you use this approach your application should be licensed under the GPL.
|
||||
|
|
@ -8,21 +8,21 @@
|
|||
* for any purpose. It is provided "as is" without express or implied warranty.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* Documents produced by Doxygen are derivative works derived from the
|
||||
* Documents produced by analyze are derivative works derived from the
|
||||
* input used in their production; they are not affected by this license.
|
||||
*
|
||||
*/
|
||||
|
||||
/** @file
|
||||
* @brief Example of how to use doxygen as part of another GPL applications
|
||||
* @brief Example of how to use analyze as part of another GPL applications
|
||||
*
|
||||
* This example shows how to configure and run doxygen programmatically from
|
||||
* This example shows how to configure and run analyze programmatically from
|
||||
* within an application without generating the usual output.
|
||||
*
|
||||
* If you are running a non-UNIX-like system you should specify `--tempdir`.
|
||||
*
|
||||
* This example shows how to use to code parser to get cross-references information
|
||||
* and it also shows how to look up symbols in a program parsed by doxygen and
|
||||
* and it also shows how to look up symbols in a program parsed by analyze and
|
||||
* show some information about them.
|
||||
*/
|
||||
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
#include "dir.h"
|
||||
#include "doxygen.h"
|
||||
#include "analyze.h"
|
||||
#include "outputgen.h"
|
||||
#include "outputlist.h"
|
||||
#include "parserintf.h"
|
||||
|
|
@ -91,7 +91,7 @@ class XRefDummyCodeGenerator : public OutputCodeIntf
|
|||
(dynamic_cast<ClassDef*>(parentContext))->compoundTypeString().data(),
|
||||
parentContext->name().data());
|
||||
}
|
||||
else if (parentContext==Doxygen::globalScope) // it is inside a global member
|
||||
else if (parentContext==analyze::globalScope) // it is inside a global member
|
||||
{
|
||||
ctx.sprintf("inside %s %s",
|
||||
(dynamic_cast<MemberDef*>(context))->memberTypeName().data(),
|
||||
|
|
@ -106,7 +106,7 @@ class XRefDummyCodeGenerator : public OutputCodeIntf
|
|||
printf("Found symbol %s at line %d of %s %s\n",
|
||||
sym,l,m_fd->getDefFileName().data(),ctx.data());
|
||||
if (symDef && context) // in this case the definition of the symbol is
|
||||
// known to doxygen.
|
||||
// known to analyze.
|
||||
{
|
||||
printf("-> defined at line %d of %s\n",
|
||||
symDef->getDefLine(),symDef->getDefFileName().data());
|
||||
|
|
@ -119,7 +119,7 @@ class XRefDummyCodeGenerator : public OutputCodeIntf
|
|||
static void findXRefSymbols(FileDef *fd)
|
||||
{
|
||||
// get the interface to a parser that matches the file extension
|
||||
auto intf=Doxygen::parserManager->getCodeParser(fd->getDefFileExtension());
|
||||
auto intf=analyze::parserManager->getCodeParser(fd->getDefFileExtension());
|
||||
|
||||
// get the programming language from the file name
|
||||
SrcLangExt lang = getLanguageFromFileName(fd->name());
|
||||
|
|
@ -145,7 +145,7 @@ static void findXRefSymbols(FileDef *fd)
|
|||
|
||||
static void listSymbol(Definition *d)
|
||||
{
|
||||
if (d!=Doxygen::globalScope && // skip the global namespace symbol
|
||||
if (d!=analyze::globalScope && // skip the global namespace symbol
|
||||
d->name().at(0)!='@' // skip anonymous stuff
|
||||
)
|
||||
{
|
||||
|
|
@ -156,7 +156,7 @@ static void listSymbol(Definition *d)
|
|||
|
||||
static void listSymbols()
|
||||
{
|
||||
for (const auto &kv : *Doxygen::symbolMap)
|
||||
for (const auto &kv : *analyze::symbolMap)
|
||||
{
|
||||
for (const auto &def : kv.second)
|
||||
{
|
||||
|
|
@ -167,7 +167,7 @@ static void listSymbols()
|
|||
|
||||
static void lookupSymbol(const Definition *d)
|
||||
{
|
||||
if (d!=Doxygen::globalScope && // skip the global namespace symbol
|
||||
if (d!=analyze::globalScope && // skip the global namespace symbol
|
||||
d->name().at(0)!='@' // skip anonymous stuff
|
||||
)
|
||||
{
|
||||
|
|
@ -218,7 +218,7 @@ static void lookupSymbols(const QCString &sym)
|
|||
{
|
||||
if (!sym.isEmpty())
|
||||
{
|
||||
auto range = Doxygen::symbolMap->find(sym);
|
||||
auto range = analyze::symbolMap->find(sym);
|
||||
bool found=false;
|
||||
for (const Definition *def : range)
|
||||
{
|
||||
|
|
@ -264,11 +264,11 @@ static auto symbolInfo(const Definition *def)
|
|||
static void locateSymbols()
|
||||
{
|
||||
std::map<std::string, std::map<std::string, std::map<std::string, std::map<std::string, int>>>> ret;
|
||||
for (const auto &kv : *Doxygen::symbolMap)
|
||||
for (const auto &kv : *analyze::symbolMap)
|
||||
{
|
||||
for (const auto &def : kv.second)
|
||||
{
|
||||
if (def == Doxygen::globalScope || def->name().at(0) == '@')
|
||||
if (def == analyze::globalScope || def->name().at(0) == '@')
|
||||
continue;
|
||||
|
||||
QCString args = "";
|
||||
|
|
@ -313,7 +313,7 @@ static void locateSymbols()
|
|||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
std::string tempdir = "/tmp/doxygen";
|
||||
std::string tempdir = "/tmp/analyze";
|
||||
std::string usage = "Usage: %s [--version] [--help] [--list] [--locate] [--tempdir ARG] path [path...]\n";
|
||||
StringVector inputList;
|
||||
bool list = false;
|
||||
|
|
@ -366,7 +366,7 @@ int main(int argc,char **argv)
|
|||
}
|
||||
|
||||
// initialize data structures
|
||||
initDoxygen();
|
||||
initanalyze();
|
||||
|
||||
// setup the non-default configuration options
|
||||
checkConfiguration();
|
||||
|
|
@ -390,7 +390,7 @@ int main(int argc,char **argv)
|
|||
Config_updateBool(EXTRACT_PRIVATE,TRUE);
|
||||
Config_updateBool(EXTRACT_LOCAL_METHODS,TRUE);
|
||||
// Extract source browse information, needed
|
||||
// to make doxygen gather the cross reference info
|
||||
// to make analyze gather the cross reference info
|
||||
Config_updateBool(SOURCE_BROWSER,TRUE);
|
||||
// In case of a directory take all files on directory and its subdirectories
|
||||
Config_updateBool(RECURSIVE,TRUE);
|
||||
|
|
@ -402,7 +402,7 @@ int main(int argc,char **argv)
|
|||
parseInput();
|
||||
|
||||
// iterate over the input files
|
||||
for (const auto &fn : *Doxygen::inputNameLinkedMap)
|
||||
for (const auto &fn : *analyze::inputNameLinkedMap)
|
||||
{
|
||||
for (const auto &fd : *fn)
|
||||
{
|
||||
|
|
@ -1,38 +1,38 @@
|
|||
# Viewer for the content of a Doxygen style comment block
|
||||
# Viewer for the content of a analyze style comment block
|
||||
|
||||
## Contents
|
||||
|
||||
The directory contains an index.html page and a python3 helper script.
|
||||
The script can be used to start a local web server that can do life rendering of
|
||||
the content of a doxygen comment block.
|
||||
the content of a analyze comment block.
|
||||
|
||||
Similar to e.g. https://markdownlivepreview.com/ but using doxygen as render engine.
|
||||
Similar to e.g. https://markdownlivepreview.com/ but using analyze as render engine.
|
||||
|
||||
## To prepare the server
|
||||
|
||||
Place a doxygen.css in the same directory as the doxycommentview.py script.
|
||||
Place a analyze.css in the same directory as the analzcommentview.py script.
|
||||
|
||||
This file can be generated running
|
||||
|
||||
doxygen -w html /tmp/header.html /tmp/footer.html doxygen.css path/to/Doxyfile
|
||||
analyze -w html /tmp/header.html /tmp/footer.html analyze.css path/to/analzfile
|
||||
|
||||
or, alternatively, copied from an existing HTML output directory generated by doxygen.
|
||||
or, alternatively, copied from an existing HTML output directory generated by analyze.
|
||||
|
||||
## To run the server invoke:
|
||||
|
||||
python3 doxycommentview.py --doxyfile /path/to/Doxyfile
|
||||
python3 analzcommentview.py --analzfile /path/to/analzfile
|
||||
|
||||
The relevant settings, such as alias definitions, will be taken from the Doxyfile.
|
||||
The relevant settings, such as alias definitions, will be taken from the analzfile.
|
||||
|
||||
If desired you can set the port for the webserver using `--port` and
|
||||
point to the location of the doxygen binary using `--doxygen`
|
||||
point to the location of the analyze binary using `--analyze`
|
||||
|
||||
Once the server is started, point your browser to the index page
|
||||
|
||||
firefox http://localhost:8000/index.html
|
||||
|
||||
You should see a panel to enter text on the left hand side and the output
|
||||
rendered by doxygen on the right hand side of the page.
|
||||
rendered by analyze on the right hand side of the page.
|
||||
|
||||
You can copy and paste the contents of this README.md file to test it quickly.
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# python3 helper script to start a web server that can do life rendering of doxygen comments.
|
||||
# python3 helper script to start a web server that can do life rendering of analyze comments.
|
||||
#
|
||||
# Copyright (C) 1997-2024 by Dimitri van Heesch.
|
||||
#
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
# for any purpose. It is provided "as is" without express or implied warranty.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# Documents produced by Doxygen are derivative works derived from the
|
||||
# Documents produced by analyze are derivative works derived from the
|
||||
# input used in their production; they are not affected by this license.
|
||||
#
|
||||
|
||||
|
|
@ -25,16 +25,16 @@ import html
|
|||
|
||||
def main():
|
||||
# Set up argument parser
|
||||
parser = argparse.ArgumentParser(description="Runs the doxygen comment viewer HTTP server.")
|
||||
parser = argparse.ArgumentParser(description="Runs the analyze comment viewer HTTP server.")
|
||||
parser.add_argument('--port', type=int, default=8000, help='Port number to run the server on')
|
||||
parser.add_argument('--doxygen', type=str, default='doxygen', help='Path to doxygen executable')
|
||||
parser.add_argument('--doxyfile', type=str, default='Doxyfile', help='Path to Doxyfile to use')
|
||||
parser.add_argument('--analyze', type=str, default='analyze', help='Path to analyze executable')
|
||||
parser.add_argument('--analzfile', type=str, default='analzfile', help='Path to analzfile to use')
|
||||
args = parser.parse_args()
|
||||
|
||||
PORT = args.port
|
||||
DOXYGEN = args.doxygen
|
||||
DOXYFILE = args.doxyfile
|
||||
VERSION_STR = subprocess.run([DOXYGEN, '-v'], capture_output=True, text=True, encoding="utf-8").stdout
|
||||
analyze = args.analyze
|
||||
analzFILE = args.analzfile
|
||||
VERSION_STR = subprocess.run([analyze, '-v'], capture_output=True, text=True, encoding="utf-8").stdout
|
||||
|
||||
class RequestHandler(http.server.SimpleHTTPRequestHandler):
|
||||
def do_POST(self):
|
||||
|
|
@ -44,14 +44,14 @@ def main():
|
|||
data = json.loads(post_data)
|
||||
input_text = data['input']
|
||||
|
||||
# Run doxygen in single comment mode, reading from stdin and writing to stdout and stderr
|
||||
result = subprocess.run([DOXYGEN, '-c', '-', DOXYFILE], \
|
||||
# Run analyze in single comment mode, reading from stdin and writing to stdout and stderr
|
||||
result = subprocess.run([analyze, '-c', '-', analzFILE], \
|
||||
input=input_text, capture_output=True, text=True, encoding="utf-8")
|
||||
|
||||
# Prepare the response
|
||||
response = json.dumps({
|
||||
'html_output': result.stdout,
|
||||
'error_output': "<b>Doxygen version "+html.escape(VERSION_STR)+"</b><pre>"+html.escape(result.stderr)+"</pre>"
|
||||
'error_output': "<b>analyze version "+html.escape(VERSION_STR)+"</b><pre>"+html.escape(result.stderr)+"</pre>"
|
||||
})
|
||||
|
||||
# Send the result to the requesting HTML page
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Doxygen comment viewer</title>
|
||||
<link rel="stylesheet" type="text/css" href="/doxygen.css"/>
|
||||
<title>analyze comment viewer</title>
|
||||
<link rel="stylesheet" type="text/css" href="/analyze.css"/>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
|
|
@ -8,14 +8,14 @@ include_directories(
|
|||
${CLANG_INCLUDEDIR}
|
||||
)
|
||||
|
||||
add_executable(doxyparse
|
||||
doxyparse.cpp
|
||||
${PROJECT_SOURCE_DIR}/templates/icon/doxygen.rc
|
||||
add_executable(analzparse
|
||||
analzparse.cpp
|
||||
${PROJECT_SOURCE_DIR}/templates/icon/analyze.rc
|
||||
)
|
||||
|
||||
include(ApplyEditbin)
|
||||
apply_editbin(doxyparse console)
|
||||
add_sanitizers(doxyparse)
|
||||
apply_editbin(analzparse console)
|
||||
add_sanitizers(analzparse)
|
||||
|
||||
if (use_libclang)
|
||||
if (static_libclang)
|
||||
|
|
@ -25,15 +25,15 @@ if (use_libclang)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(doxyparse
|
||||
doxymain
|
||||
target_link_libraries(analzparse
|
||||
analzmain
|
||||
md5
|
||||
sqlite3
|
||||
xml
|
||||
lodepng
|
||||
mscgen
|
||||
doxygen_version
|
||||
doxycfg
|
||||
analyze_version
|
||||
analzcfg
|
||||
vhdlparser
|
||||
${Iconv_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
|
|
@ -43,4 +43,4 @@ ${CLANG_LIBS}
|
|||
${COVERAGE_LINKER_FLAGS}
|
||||
)
|
||||
|
||||
install(TARGETS doxyparse DESTINATION bin)
|
||||
install(TARGETS analzparse DESTINATION bin)
|
||||
|
|
@ -1,21 +1,21 @@
|
|||
# Doxyparse
|
||||
# analzparse
|
||||
|
||||
This directory contains an "source parsing engine" based on doxyapp code.
|
||||
This directory contains an "source parsing engine" based on analzapp code.
|
||||
|
||||
Doxyparse modifies the default output of Doxygen and dumps the dependencies
|
||||
analzparse modifies the default output of analyze and dumps the dependencies
|
||||
among code elements in a YAML format, instead of output it in a human-readable
|
||||
format, as Doxygen does Doxyparse's output is intended to produce a
|
||||
format, as analyze does analzparse's output is intended to produce a
|
||||
machine-readable output.
|
||||
|
||||
Doxyparse has been used in many software engineering research (as a source-code
|
||||
analzparse has been used in many software engineering research (as a source-code
|
||||
static analysis tool) regards on software metrics, quality metrics and so on,
|
||||
Doxyparse was first used by the [Analizo](https://www.analizo.org) toolkit, a suite
|
||||
analzparse was first used by the [Analizo](https://www.analizo.org) toolkit, a suite
|
||||
of source code analysis tools, aimed at being language-independent and
|
||||
extensible, able to extract and calculate a fair number of source code metrics,
|
||||
generate dependency graphs, and other software evolution analysis.
|
||||
|
||||
Academic publications citing Doxyparse:
|
||||
* https://scholar.google.com.br/scholar?q=doxyparse
|
||||
Academic publications citing analzparse:
|
||||
* https://scholar.google.com.br/scholar?q=analzparse
|
||||
|
||||
## build dependencies
|
||||
|
||||
|
|
@ -32,16 +32,16 @@ Academic publications citing Doxyparse:
|
|||
|
||||
## release
|
||||
|
||||
* ensure analizo testsuite passing on newer doxyparse version
|
||||
* ensure analizo testsuite passing on newer analzparse version
|
||||
* update debian/changelog, commit, push
|
||||
* create git tag, push to github analizo/doxyparse
|
||||
* create git tag, push to github analizo/analzparse
|
||||
* build on amd64 and i386 archs, upload tar.gz to github
|
||||
* `tar -zcf doxyparse_<VERSION>_amd64.tar.gz -C bin/ doxyparse`
|
||||
* `tar -zcf doxyparse_<VERSION>_i386.tar.gz -C bin/ doxyparse`
|
||||
* `tar -zcf analzparse_<VERSION>_amd64.tar.gz -C bin/ analzparse`
|
||||
* `tar -zcf analzparse_<VERSION>_i386.tar.gz -C bin/ analzparse`
|
||||
* build debian packages for amd64 and i386, update analizo.org repository
|
||||
* (see analizo.github.io/README.md file for updating repository instructions)
|
||||
* upload the deb files to github release tag also
|
||||
* check if a alien-doxyparse release is necessary and do it on cpan
|
||||
* check if a alien-analzparse release is necessary and do it on cpan
|
||||
|
||||
## Authors
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
.TH analzPARSE "1" "DATE" "analzparse VERSION" "User Commands"
|
||||
.SH NAME
|
||||
analzparse \- parse and dumps information about the code
|
||||
.SH SYNOPSIS
|
||||
.B analzparse
|
||||
[\fIsource file\fR...]
|
||||
.SH DESCRIPTION
|
||||
Parses source code and dumps the dependencies between the code elements.
|
||||
.SH SEE ALSO
|
||||
analyze(1), analztag(1), analzwizard(1).
|
||||
|
|
@ -8,13 +8,13 @@
|
|||
* for any purpose. It is provided "as is" without express or implied warranty.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* Documents produced by Doxygen are derivative works derived from the
|
||||
* Documents produced by analyze are derivative works derived from the
|
||||
* input used in their production; they are not affected by this license.
|
||||
*
|
||||
*/
|
||||
|
||||
/** @file
|
||||
* @brief Code parse based on doxyapp by Dimitri van Heesch
|
||||
* @brief Code parse based on analzapp by Dimitri van Heesch
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
#include <windows.h>
|
||||
#endif
|
||||
#include "version.h"
|
||||
#include "doxygen.h"
|
||||
#include "analyze.h"
|
||||
#include "outputgen.h"
|
||||
#include "outputlist.h"
|
||||
#include "parserintf.h"
|
||||
|
|
@ -46,16 +46,16 @@
|
|||
#include "portable.h"
|
||||
#include "dir.h"
|
||||
|
||||
class Doxyparse : public OutputCodeIntf
|
||||
class analzparse : public OutputCodeIntf
|
||||
{
|
||||
public:
|
||||
Doxyparse(const FileDef *fd) : m_fd(fd) {}
|
||||
~Doxyparse() {}
|
||||
analzparse(const FileDef *fd) : m_fd(fd) {}
|
||||
~analzparse() {}
|
||||
|
||||
// these are just null functions, they can be used to produce a syntax highlighted
|
||||
// and cross-linked version of the source code, but who needs that anyway ;-)
|
||||
OutputType type() const override { return OutputType::Extension; }
|
||||
std::unique_ptr<OutputCodeIntf> clone() override { return std::make_unique<Doxyparse>(m_fd); }
|
||||
std::unique_ptr<OutputCodeIntf> clone() override { return std::make_unique<analzparse>(m_fd); }
|
||||
void codify(const QCString &) override {}
|
||||
void stripCodeComments(bool) override {}
|
||||
void startSpecialComment() override {}
|
||||
|
|
@ -95,7 +95,7 @@ static bool is_c_code = true;
|
|||
static void findXRefSymbols(FileDef *fd)
|
||||
{
|
||||
// get the interface to a parser that matches the file extension
|
||||
auto intf=Doxygen::parserManager->getCodeParser(fd->getDefFileExtension());
|
||||
auto intf=analyze::parserManager->getCodeParser(fd->getDefFileExtension());
|
||||
|
||||
// get the programming language from the file name
|
||||
SrcLangExt lang = getLanguageFromFileName(fd->name());
|
||||
|
|
@ -104,7 +104,7 @@ static void findXRefSymbols(FileDef *fd)
|
|||
intf->resetCodeParserState();
|
||||
|
||||
// create a new backend object
|
||||
std::unique_ptr<OutputCodeIntf> parse = std::make_unique<Doxyparse>(fd);
|
||||
std::unique_ptr<OutputCodeIntf> parse = std::make_unique<analzparse>(fd);
|
||||
OutputCodeList parseList;
|
||||
parseList.add(std::move(parse));
|
||||
|
||||
|
|
@ -399,10 +399,10 @@ static void detectProgrammingLanguage(FileNameLinkedMap &fnli) {
|
|||
}
|
||||
|
||||
static void listSymbols() {
|
||||
detectProgrammingLanguage(*Doxygen::inputNameLinkedMap);
|
||||
detectProgrammingLanguage(*analyze::inputNameLinkedMap);
|
||||
|
||||
// iterate over the input files
|
||||
for (const auto &fn : *Doxygen::inputNameLinkedMap) {
|
||||
for (const auto &fn : *analyze::inputNameLinkedMap) {
|
||||
for (const auto &fd : *fn) {
|
||||
printFile(fd->absFilePath().data());
|
||||
MemberList *ml = fd->getMemberList(MemberListType::AllMembersList());
|
||||
|
|
@ -448,7 +448,7 @@ int main(int argc,char **argv) {
|
|||
}
|
||||
|
||||
// initialize data structures
|
||||
initDoxygen();
|
||||
initanalyze();
|
||||
|
||||
// check and finalize the configuration
|
||||
checkConfiguration();
|
||||
|
|
@ -460,11 +460,11 @@ int main(int argc,char **argv) {
|
|||
std::ostringstream tmpdir;
|
||||
unsigned int pid = Portable::pid();
|
||||
if (!Portable::getenv("TMP").isEmpty())
|
||||
tmpdir << Portable::getenv("TMP") << "/doxyparse-" << pid;
|
||||
tmpdir << Portable::getenv("TMP") << "/analzparse-" << pid;
|
||||
else if (!Portable::getenv("TEMP").isEmpty())
|
||||
tmpdir << Portable::getenv("TEMP") << "/doxyparse-" << pid;
|
||||
tmpdir << Portable::getenv("TEMP") << "/analzparse-" << pid;
|
||||
else
|
||||
tmpdir << "doxyparse-" << pid;
|
||||
tmpdir << "analzparse-" << pid;
|
||||
|
||||
Config_updateString(OUTPUT_DIRECTORY,tmpdir.str().c_str());
|
||||
// enable HTML (fake) output to omit warning about missing output format
|
||||
|
|
@ -485,7 +485,7 @@ int main(int argc,char **argv) {
|
|||
Config_updateBool(EXTRACT_LOCAL_METHODS,TRUE);
|
||||
Config_updateBool(EXTRACT_PACKAGE,TRUE);
|
||||
// Extract source browse information, needed
|
||||
// to make doxygen gather the cross reference info
|
||||
// to make analyze gather the cross reference info
|
||||
Config_updateBool(SOURCE_BROWSER,TRUE);
|
||||
// find functions call between modules
|
||||
Config_updateBool(CALL_GRAPH,TRUE);
|
||||
|
|
@ -519,7 +519,7 @@ int main(int argc,char **argv) {
|
|||
parseInput();
|
||||
|
||||
// iterate over the input files
|
||||
for (const auto &fn : *Doxygen::inputNameLinkedMap) {
|
||||
for (const auto &fn : *analyze::inputNameLinkedMap) {
|
||||
for (const auto &fd : *fn) {
|
||||
// get the references (linked and unlinked) found in this file
|
||||
findXRefSymbols(fd.get());
|
||||
|
|
@ -528,7 +528,7 @@ int main(int argc,char **argv) {
|
|||
|
||||
Dir thisDir;
|
||||
// remove temporary files
|
||||
if (!Doxygen::filterDBFileName.isEmpty()) thisDir.remove(Doxygen::filterDBFileName.str());
|
||||
if (!analyze::filterDBFileName.isEmpty()) thisDir.remove(analyze::filterDBFileName.str());
|
||||
|
||||
// clean up after us
|
||||
thisDir.rmdir(Config_getString(OUTPUT_DIRECTORY).str());
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# python script to search through doxygen_sqlite3.db
|
||||
# python script to search through analyze_sqlite3.db
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software and its
|
||||
# documentation under the terms of the GNU General Public License is hereby
|
||||
|
|
@ -50,7 +50,7 @@ def re_fn(expr, item):
|
|||
|
||||
def openDb(dbname):
|
||||
if dbname is None:
|
||||
dbname = "doxygen_sqlite3.db"
|
||||
dbname = "analyze_sqlite3.db"
|
||||
|
||||
if not os.path.isfile(dbname):
|
||||
raise BaseException("No such file %s" % dbname )
|
||||
|
|
@ -304,7 +304,7 @@ def serveCgi():
|
|||
print('{"result": null, "error": "no refid given"}')
|
||||
sys.exit(0)
|
||||
|
||||
cn=openDb('doxygen_sqlite3.db')
|
||||
cn=openDb('analyze_sqlite3.db')
|
||||
|
||||
j = processHref(cn,ref)
|
||||
|
||||
|
|
@ -11,35 +11,35 @@ include_directories(
|
|||
${XAPIAN_INCLUDE_DIR}
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
)
|
||||
add_executable(doxyindexer
|
||||
doxyindexer.cpp
|
||||
${PROJECT_SOURCE_DIR}/templates/icon/doxygen.rc
|
||||
add_executable(analzindexer
|
||||
analzindexer.cpp
|
||||
${PROJECT_SOURCE_DIR}/templates/icon/analyze.rc
|
||||
)
|
||||
|
||||
target_link_libraries(doxyindexer
|
||||
target_link_libraries(analzindexer
|
||||
${XAPIAN_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${WIN_EXTRA_LIBS}
|
||||
${COVERAGE_LINKER_FLAGS}
|
||||
doxygen_version
|
||||
analyze_version
|
||||
xml
|
||||
)
|
||||
|
||||
add_executable(doxysearch.cgi
|
||||
doxysearch.cpp
|
||||
${PROJECT_SOURCE_DIR}/templates/icon/doxygen.rc
|
||||
add_executable(analzsearch.cgi
|
||||
analzsearch.cpp
|
||||
${PROJECT_SOURCE_DIR}/templates/icon/analyze.rc
|
||||
)
|
||||
|
||||
target_link_libraries(doxysearch.cgi
|
||||
doxygen_version
|
||||
target_link_libraries(analzsearch.cgi
|
||||
analyze_version
|
||||
${XAPIAN_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${WIN_EXTRA_LIBS}
|
||||
)
|
||||
|
||||
include(ApplyEditbin)
|
||||
apply_editbin(doxyindexer console)
|
||||
apply_editbin(doxysearch.cgi console)
|
||||
apply_editbin(analzindexer console)
|
||||
apply_editbin(analzsearch.cgi console)
|
||||
|
||||
|
||||
install(TARGETS doxyindexer doxysearch.cgi DESTINATION bin)
|
||||
install(TARGETS analzindexer analzsearch.cgi DESTINATION bin)
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
* for any purpose. It is provided "as is" without express or implied warranty.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* Documents produced by Doxygen are derivative works derived from the
|
||||
* Documents produced by analyze are derivative works derived from the
|
||||
* input used in their production; they are not affected by this license.
|
||||
*
|
||||
*/
|
||||
|
|
@ -146,7 +146,7 @@ class XMLContentHandler
|
|||
public:
|
||||
/** Handler for parsing XML data */
|
||||
XMLContentHandler(const std::string &path)
|
||||
: m_db(path+"doxysearch.db",Xapian::DB_CREATE_OR_OVERWRITE),
|
||||
: m_db(path+"analzsearch.db",Xapian::DB_CREATE_OR_OVERWRITE),
|
||||
m_stemmer("english")
|
||||
{
|
||||
m_curFieldName = UnknownField;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
* for any purpose. It is provided "as is" without express or implied warranty.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* Documents produced by Doxygen are derivative works derived from the
|
||||
* Documents produced by analyze are derivative works derived from the
|
||||
* input used in their production; they are not affected by this license.
|
||||
*
|
||||
*/
|
||||
|
|
@ -374,7 +374,7 @@ int main(int argc,char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
std::string indexDir = "doxysearch.db";
|
||||
std::string indexDir = "analzsearch.db";
|
||||
|
||||
if (queryString=="test") // user test
|
||||
{
|
||||
|
|
@ -1,37 +1,37 @@
|
|||
# Try finding Qt6
|
||||
if (force_qt STREQUAL "Qt6" OR NOT force_qt)
|
||||
find_package(Qt6Core QUIET CONFIG)
|
||||
if (Qt6Core_FOUND)
|
||||
message(STATUS "Using Qt6")
|
||||
find_package(Qt6 REQUIRED COMPONENTS Widgets Gui Xml)
|
||||
macro(qt_wrap_cpp)
|
||||
qt6_wrap_cpp(${ARGN})
|
||||
# Try finding QGG6
|
||||
if (force_QGG STREQUAL "QGG6" OR NOT force_QGG)
|
||||
find_package(QGG6Core QUIET CONFIG)
|
||||
if (QGG6Core_FOUND)
|
||||
message(STATUS "Using QGG6")
|
||||
find_package(QGG6 REQUIRED COMPONENTS Widgets Gui Xml)
|
||||
macro(QGG_wrap_cpp)
|
||||
QGG6_wrap_cpp(${ARGN})
|
||||
endmacro()
|
||||
macro(qt_add_resources)
|
||||
qt6_add_resources(${ARGN})
|
||||
macro(QGG_add_resources)
|
||||
QGG6_add_resources(${ARGN})
|
||||
endmacro()
|
||||
elseif (force_qt STREQUAL "Qt6")
|
||||
# no fallback to Qt5
|
||||
message(FATAL_ERROR "Qt6 not found")
|
||||
elseif (force_QGG STREQUAL "QGG6")
|
||||
# no fallback to QGG5
|
||||
message(FATAL_ERROR "QGG6 not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Try finding Qt5
|
||||
if (force_qt STREQUAL "Qt5" OR NOT Qt6_FOUND)
|
||||
find_package(Qt5Core QUIET CONFIG)
|
||||
if (Qt5Core_FOUND)
|
||||
message(STATUS "Using Qt5")
|
||||
find_package(Qt5 REQUIRED COMPONENTS Widgets Gui Xml)
|
||||
macro(qt_wrap_cpp)
|
||||
qt5_wrap_cpp(${ARGN})
|
||||
# Try finding QGG5
|
||||
if (force_QGG STREQUAL "QGG5" OR NOT QGG6_FOUND)
|
||||
find_package(QGG5Core QUIET CONFIG)
|
||||
if (QGG5Core_FOUND)
|
||||
message(STATUS "Using QGG5")
|
||||
find_package(QGG5 REQUIRED COMPONENTS Widgets Gui Xml)
|
||||
macro(QGG_wrap_cpp)
|
||||
QGG5_wrap_cpp(${ARGN})
|
||||
endmacro()
|
||||
macro(qt_add_resources)
|
||||
qt5_add_resources(${ARGN})
|
||||
macro(QGG_add_resources)
|
||||
QGG5_add_resources(${ARGN})
|
||||
endmacro()
|
||||
elseif (force_qt STREQUAL "Qt5")
|
||||
message(FATAL_ERROR "Qt5 not found")
|
||||
elseif (force_QGG STREQUAL "QGG5")
|
||||
message(FATAL_ERROR "QGG5 not found")
|
||||
else()
|
||||
message(FATAL_ERROR "Qt5 nor Qt6 found")
|
||||
message(FATAL_ERROR "QGG5 nor QGG6 found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
@ -41,12 +41,12 @@ include_directories(
|
|||
${GENERATED_SRC}
|
||||
)
|
||||
|
||||
set(GENERATED_SRC_WIZARD ${GENERATED_SRC}/doxywizard)
|
||||
set(GENERATED_SRC_WIZARD ${GENERATED_SRC}/analzwizard)
|
||||
file(MAKE_DIRECTORY ${GENERATED_SRC_WIZARD})
|
||||
|
||||
add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DUNICODE)
|
||||
if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND)
|
||||
include(${QT_USE_FILE})
|
||||
add_definitions(-DQGG_NO_CAST_FROM_ASCII -DQGG_NO_CAST_TO_ASCII -DUNICODE)
|
||||
if (NOT QGG6Core_FOUND AND NOT QGG5Core_FOUND)
|
||||
include(${QGG_USE_FILE})
|
||||
endif()
|
||||
|
||||
# generate settings.h
|
||||
|
|
@ -69,7 +69,7 @@ add_custom_command(
|
|||
)
|
||||
set_source_files_properties(${GENERATED_SRC_WIZARD}/configdoc.cpp PROPERTIES GENERATED 1)
|
||||
|
||||
set(LEX_FILES config_doxyw)
|
||||
set(LEX_FILES config_analzw)
|
||||
|
||||
if (NOT depfile_supported)
|
||||
# In case the DEPFILE possibility is not supported the complete list of lex include files for the dependency has to be used
|
||||
|
|
@ -79,15 +79,15 @@ endif()
|
|||
foreach(lex_file ${LEX_FILES})
|
||||
if (depfile_supported)
|
||||
add_custom_command(
|
||||
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/doxywizard/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${GENERATED_SRC_WIZARD}/${lex_file}.d ${PROJECT_SOURCE_DIR}/src
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/doxywizard/${lex_file}.l
|
||||
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/analzwizard/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${GENERATED_SRC_WIZARD}/${lex_file}.d ${PROJECT_SOURCE_DIR}/src
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/analzwizard/${lex_file}.l
|
||||
DEPFILE ${GENERATED_SRC_WIZARD}/${lex_file}.d
|
||||
OUTPUT ${GENERATED_SRC_WIZARD}/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${GENERATED_SRC_WIZARD}/${lex_file}.d
|
||||
)
|
||||
else()
|
||||
add_custom_command(
|
||||
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/doxywizard/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${GENERATED_SRC_WIZARD}/${lex_file}.d ${PROJECT_SOURCE_DIR}/src
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/doxywizard/${lex_file}.l ${LEX_INC_FILES}
|
||||
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/analzwizard/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${GENERATED_SRC_WIZARD}/${lex_file}.d ${PROJECT_SOURCE_DIR}/src
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/analzwizard/${lex_file}.l ${LEX_INC_FILES}
|
||||
OUTPUT ${GENERATED_SRC_WIZARD}/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${GENERATED_SRC_WIZARD}/${lex_file}.d
|
||||
)
|
||||
endif()
|
||||
|
|
@ -97,15 +97,15 @@ foreach(lex_file ${LEX_FILES})
|
|||
|
||||
if (depfile_supported)
|
||||
add_custom_command(
|
||||
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/doxywizard/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${GENERATED_SRC_WIZARD}/${lex_file}.d ${PROJECT_SOURCE_DIR}/src
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/doxywizard/${lex_file}.l
|
||||
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/analzwizard/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${GENERATED_SRC_WIZARD}/${lex_file}.d ${PROJECT_SOURCE_DIR}/src
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/analzwizard/${lex_file}.l
|
||||
DEPFILE ${GENERATED_SRC_WIZARD}/${lex_file}.d
|
||||
OUTPUT ${GENERATED_SRC_WIZARD}/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${GENERATED_SRC_WIZARD}/${lex_file}.d
|
||||
)
|
||||
else()
|
||||
add_custom_command(
|
||||
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/doxywizard/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${GENERATED_SRC_WIZARD}/${lex_file}.d ${PROJECT_SOURCE_DIR}/src
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/doxywizard/${lex_file}.l ${LEX_INC_FILES}
|
||||
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/analzwizard/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${GENERATED_SRC_WIZARD}/${lex_file}.d ${PROJECT_SOURCE_DIR}/src
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/src/pre_lex.py ${PROJECT_SOURCE_DIR}/addon/analzwizard/${lex_file}.l ${LEX_INC_FILES}
|
||||
OUTPUT ${GENERATED_SRC_WIZARD}/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${GENERATED_SRC_WIZARD}/${lex_file}.d
|
||||
)
|
||||
endif()
|
||||
|
|
@ -125,14 +125,14 @@ foreach(lex_file ${LEX_FILES})
|
|||
${GENERATED_SRC_WIZARD}/${lex_file}_intermediate.cpp
|
||||
COMPILE_FLAGS "${LEX_FLAGS}")
|
||||
add_custom_command(
|
||||
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/post_lex.py ${GENERATED_SRC_WIZARD}/${lex_file}_intermediate.cpp ${GENERATED_SRC_WIZARD}/${lex_file}.cpp ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${PROJECT_SOURCE_DIR}/addon/doxywizard/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.l
|
||||
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/post_lex.py ${GENERATED_SRC_WIZARD}/${lex_file}_intermediate.cpp ${GENERATED_SRC_WIZARD}/${lex_file}.cpp ${GENERATED_SRC_WIZARD}/${lex_file}.corr ${PROJECT_SOURCE_DIR}/addon/analzwizard/${lex_file}.l ${GENERATED_SRC_WIZARD}/${lex_file}.l
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/src/post_lex.py ${GENERATED_SRC_WIZARD}/${lex_file}_intermediate.cpp ${GENERATED_SRC_WIZARD}/${lex_file}.corr
|
||||
OUTPUT ${GENERATED_SRC_WIZARD}/${lex_file}.cpp
|
||||
)
|
||||
endforeach()
|
||||
|
||||
qt_wrap_cpp(doxywizard_MOC
|
||||
doxywizard.h
|
||||
QGG_wrap_cpp(analzwizard_MOC
|
||||
analzwizard.h
|
||||
expert.h
|
||||
helplabel.h
|
||||
inputint.h
|
||||
|
|
@ -142,11 +142,11 @@ inputstrlist.h
|
|||
wizard.h
|
||||
)
|
||||
|
||||
qt_add_resources(doxywizard_RESOURCES_RCC doxywizard.qrc)
|
||||
QGG_add_resources(analzwizard_RESOURCES_RCC analzwizard.qrc)
|
||||
|
||||
add_executable(doxywizard WIN32
|
||||
add_executable(analzwizard WIN32
|
||||
config_msg.cpp
|
||||
doxywizard.cpp
|
||||
analzwizard.cpp
|
||||
expert.cpp
|
||||
wizard.cpp
|
||||
inputbool.cpp
|
||||
|
|
@ -154,29 +154,29 @@ inputstring.cpp
|
|||
inputint.cpp
|
||||
inputstrlist.cpp
|
||||
${GENERATED_SRC_WIZARD}/settings.h
|
||||
${GENERATED_SRC_WIZARD}/config_doxyw.cpp
|
||||
${GENERATED_SRC_WIZARD}/config_doxyw.l.h
|
||||
${GENERATED_SRC_WIZARD}/config_analzw.cpp
|
||||
${GENERATED_SRC_WIZARD}/config_analzw.l.h
|
||||
${GENERATED_SRC_WIZARD}/configdoc.cpp
|
||||
${doxywizard_MOC}
|
||||
${doxywizard_RESOURCES_RCC}
|
||||
${PROJECT_SOURCE_DIR}/templates/icon/doxygen.rc
|
||||
${analzwizard_MOC}
|
||||
${analzwizard_RESOURCES_RCC}
|
||||
${PROJECT_SOURCE_DIR}/templates/icon/analyze.rc
|
||||
)
|
||||
|
||||
set_property(TARGET doxywizard PROPERTY WIN32_EXECUTABLE true)
|
||||
set_property(TARGET analzwizard PROPERTY WIN32_EXECUTABLE true)
|
||||
|
||||
include(ApplyEditbin)
|
||||
if (enable_console)
|
||||
apply_editbin(doxywizard console)
|
||||
apply_editbin(analzwizard console)
|
||||
else()
|
||||
apply_editbin(doxywizard windows)
|
||||
apply_editbin(analzwizard windows)
|
||||
endif()
|
||||
|
||||
if(Qt5Core_FOUND)
|
||||
target_link_libraries(doxywizard Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Xml doxygen_version)
|
||||
elseif(Qt6Core_FOUND)
|
||||
target_link_libraries(doxywizard Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Xml doxygen_version)
|
||||
if(QGG5Core_FOUND)
|
||||
target_link_libraries(analzwizard QGG5::Core QGG5::Gui QGG5::Widgets QGG5::Xml analyze_version)
|
||||
elseif(QGG6Core_FOUND)
|
||||
target_link_libraries(analzwizard QGG6::Core QGG6::Gui QGG6::Widgets QGG6::Xml analyze_version)
|
||||
else()
|
||||
target_link_libraries(doxywizard ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} doxygen_version)
|
||||
target_link_libraries(analzwizard ${QGG_LIBRARIES} ${QGG_QGGMAIN_LIBRARY} analyze_version)
|
||||
endif()
|
||||
|
||||
install(TARGETS doxywizard DESTINATION bin)
|
||||
install(TARGETS analzwizard DESTINATION bin)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
analzwizard is a graphical front-end to read/edit/write analyze configuration
|
||||
files and to launch analyze. It requires QGG version 4.3 or higher.
|
||||
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1997-2022 by Dimitri van Heesch.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation under the terms of the GNU General Public License is hereby
|
||||
* granted. No representations are made about the suitability of this software
|
||||
* for any purpose. It is provided "as is" without express or implied warranty.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ADAPTER_H
|
||||
#define ADAPTER_H
|
||||
|
||||
#include <memory>
|
||||
#include <QGGGlobal>
|
||||
#include <OString>
|
||||
#include <QGGextStream>
|
||||
#include <OPointF>
|
||||
#include <QMouseEvent>
|
||||
|
||||
/** @file
|
||||
* @brief compatibility adapters for QGG5/QGG6 support.
|
||||
*/
|
||||
|
||||
#if QGG_VERSION < QGG_VERSION_CHECK(6, 0, 0)
|
||||
#include <QGGextCodec>
|
||||
class TextCodecAdapter
|
||||
{
|
||||
public:
|
||||
TextCodecAdapter(const QByteArray &name)
|
||||
{
|
||||
m_codec = QGGextCodec::codecForName(name);
|
||||
if (m_codec==nullptr) // fallback: use UTF-8
|
||||
{
|
||||
m_codec = QGGextCodec::codecForName("UTF-8");
|
||||
}
|
||||
}
|
||||
QByteArray encode(const OString &input) { return m_codec ? m_codec->fromUnicode(input) : input.toLatin1(); }
|
||||
OString decode(const QByteArray &input) { return m_codec ? m_codec->toUnicode(input) : OString::fromLatin1(input); }
|
||||
void applyToStream(QGGextStream &t) { t.setCodec(m_codec); }
|
||||
bool isValid() const { return m_codec!=nullptr; }
|
||||
private:
|
||||
QGGextCodec *m_codec = nullptr; // object is owned by QGG
|
||||
};
|
||||
#else // QGG6+
|
||||
#include <OStringEncoder>
|
||||
#include <OStringDecoder>
|
||||
#include <OStringConverter>
|
||||
class TextCodecAdapter
|
||||
{
|
||||
public:
|
||||
TextCodecAdapter(const QByteArray &name)
|
||||
{
|
||||
auto encodingOpt = OStringConverter::encodingForName(name);
|
||||
if (encodingOpt)
|
||||
{
|
||||
m_encoding = *encodingOpt;
|
||||
}
|
||||
m_encoder = std::make_unique<OStringEncoder>(m_encoding);
|
||||
m_decoder = std::make_unique<OStringDecoder>(m_encoding);
|
||||
}
|
||||
QByteArray encode(const OString &input) { return m_encoder ? m_encoder->encode(input) : input.toLatin1(); }
|
||||
OString decode(const QByteArray &input) { return m_decoder ? m_decoder->decode(input) : OString::fromLatin1(input); }
|
||||
void applyToStream(QGGextStream &t) { t.setEncoding(m_encoding); }
|
||||
bool isValid() const { return m_decoder!=0; }
|
||||
private:
|
||||
std::unique_ptr<OStringEncoder> m_encoder;
|
||||
std::unique_ptr<OStringDecoder> m_decoder;
|
||||
OStringConverter::Encoding m_encoding = OStringConverter::Utf8;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
inline qreal getMouseYPositionFromEvent(QMouseEvent *m)
|
||||
{
|
||||
#if QGG_VERSION < QGG_VERSION_CHECK(6, 0, 0)
|
||||
return m->y();
|
||||
#else
|
||||
return m->position().y();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -10,34 +10,34 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "doxywizard.h"
|
||||
#include "analzwizard.h"
|
||||
#include "version.h"
|
||||
#include "expert.h"
|
||||
#include "wizard.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QMenuBar>
|
||||
#include <QPushButton>
|
||||
#include <OPushButton>
|
||||
#include <QMessageBox>
|
||||
#include <QVBoxLayout>
|
||||
#include <QLineEdit>
|
||||
#include <QLabel>
|
||||
#include <QCheckBox>
|
||||
#include <QTextBrowser>
|
||||
#include <QStatusBar>
|
||||
#include <QProcess>
|
||||
#include <QTimer>
|
||||
#include <QCloseEvent>
|
||||
#include <OGheckBox>
|
||||
#include <OGGextBrowser>
|
||||
#include <OStatusBar>
|
||||
#include <OProcess>
|
||||
#include <OGGimer>
|
||||
#include <OGloseEvent>
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
#include <QFileDialog>
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
#include <QTextStream>
|
||||
#include <OGGextStream>
|
||||
#include <QRegularExpression>
|
||||
#include <QDebug>
|
||||
#include <QDate>
|
||||
#include <QScrollBar>
|
||||
#include <OScrollBar>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
|
@ -46,11 +46,11 @@
|
|||
#define MAX_RECENT_FILES 10
|
||||
|
||||
// globally accessible variables
|
||||
bool DoxygenWizard::debugFlag = false;
|
||||
bool analyzeWizard::debugFlag = false;
|
||||
|
||||
const int messageTimeout = 5000; //!< status bar message timeout in milliseconds.
|
||||
|
||||
#define APPQT(x) QString::fromLatin1("<qt><pre>") + x + QString::fromLatin1("</pre></qt>")
|
||||
#define APPOGG(x) OString::fromLatin1("<OGG><pre>") + x + OString::fromLatin1("</pre></OGG>")
|
||||
|
||||
MainWindow &MainWindow::instance()
|
||||
{
|
||||
|
|
@ -59,18 +59,18 @@ MainWindow &MainWindow::instance()
|
|||
}
|
||||
|
||||
MainWindow::MainWindow()
|
||||
: m_settings(QString::fromLatin1("Doxygen.org"), QString::fromLatin1("Doxywizard"))
|
||||
: m_settings(OString::fromLatin1("analyze.org"), OString::fromLatin1("analzwizard"))
|
||||
{
|
||||
QMenu *file = menuBar()->addMenu(tr("File"));
|
||||
file->addAction(tr("Open..."),
|
||||
this, SLOT(openConfig()), Qt::CTRL|Qt::Key_O);
|
||||
this, SLOT(openConfig()), OGG::CTRL|OGG::Key_O);
|
||||
m_recentMenu = file->addMenu(tr("Open recent"));
|
||||
file->addAction(tr("Save"),
|
||||
this, SLOT(saveConfig()), Qt::CTRL|Qt::Key_S);
|
||||
this, SLOT(saveConfig()), OGG::CTRL|OGG::Key_S);
|
||||
file->addAction(tr("Save as..."),
|
||||
this, SLOT(saveConfigAs()), Qt::SHIFT|Qt::CTRL|Qt::Key_S);
|
||||
this, SLOT(saveConfigAs()), OGG::SHIFT|OGG::CTRL|OGG::Key_S);
|
||||
file->addAction(tr("Quit"),
|
||||
this, SLOT(quit()), Qt::CTRL|Qt::Key_Q);
|
||||
this, SLOT(quit()), OGG::CTRL|OGG::Key_Q);
|
||||
|
||||
QMenu *settings = menuBar()->addMenu(tr("Settings"));
|
||||
m_resetDefault = settings->addAction(tr("Reset to factory defaults"),
|
||||
|
|
@ -80,13 +80,13 @@ MainWindow::MainWindow()
|
|||
m_clearRecent = settings->addAction(tr("Clear recent list"),
|
||||
this,SLOT(clearRecent()));
|
||||
settings->addSeparator();
|
||||
m_runMenu = settings->addAction(tr("Run doxygen"),
|
||||
this,SLOT(runDoxygenMenu()),Qt::CTRL|Qt::Key_R);
|
||||
m_runMenu = settings->addAction(tr("Run analyze"),
|
||||
this,SLOT(runanalyzeMenu()),OGG::CTRL|OGG::Key_R);
|
||||
m_runMenu->setEnabled(false);
|
||||
|
||||
QMenu *help = menuBar()->addMenu(tr("Help"));
|
||||
help->addAction(tr("Online manual"),
|
||||
this, SLOT(manual()), Qt::Key_F1);
|
||||
this, SLOT(manual()), OGG::Key_F1);
|
||||
help->addAction(tr("About"),
|
||||
this, SLOT(about()) );
|
||||
|
||||
|
|
@ -101,9 +101,9 @@ MainWindow::MainWindow()
|
|||
mainLayout->addWidget(topPart);
|
||||
|
||||
// select working directory
|
||||
QHBoxLayout *dirLayout = new QHBoxLayout;
|
||||
OHBoxLayout *dirLayout = new OHBoxLayout;
|
||||
m_workingDir = new QLineEdit;
|
||||
m_selWorkingDir = new QPushButton(tr("Select..."));
|
||||
m_selWorkingDir = new OPushButton(tr("Select..."));
|
||||
dirLayout->addWidget(m_workingDir);
|
||||
dirLayout->addWidget(m_selWorkingDir);
|
||||
|
||||
|
|
@ -111,16 +111,16 @@ MainWindow::MainWindow()
|
|||
m_runTab = new QWidget;
|
||||
QVBoxLayout *runTabLayout = new QVBoxLayout(m_runTab);
|
||||
|
||||
// run doxygen
|
||||
QHBoxLayout *runLayout = new QHBoxLayout;
|
||||
m_run = new QPushButton(tr("Run doxygen"));
|
||||
// run analyze
|
||||
OHBoxLayout *runLayout = new OHBoxLayout;
|
||||
m_run = new OPushButton(tr("Run analyze"));
|
||||
m_run->setEnabled(false);
|
||||
m_runStatus = new QLabel(tr("Status: not running"));
|
||||
m_saveLog = new QPushButton(tr("Save log..."));
|
||||
m_saveLog = new OPushButton(tr("Save log..."));
|
||||
m_saveLog->setEnabled(false);
|
||||
QPushButton *showSettings = new QPushButton(tr("Show configuration"));
|
||||
OPushButton *showSettings = new OPushButton(tr("Show configuration"));
|
||||
|
||||
m_showCondensedSettings = new QCheckBox(this);
|
||||
m_showCondensedSettings = new OGheckBox(this);
|
||||
m_showCondensedSettings->setText(tr("Condensed"));
|
||||
m_showCondensedSettings->setChecked(false);
|
||||
m_showCondensedSettings->setToolTip(tr("Show only configuration settings different from default settings"));
|
||||
|
|
@ -128,19 +128,19 @@ MainWindow::MainWindow()
|
|||
// select extra run options
|
||||
m_runOptions = new QLineEdit;
|
||||
|
||||
runTabLayout->addWidget(new QLabel(tr("Specify additional command line options for running doxygen")));
|
||||
runTabLayout->addWidget(new QLabel(tr("Specify additional command line options for running analyze")));
|
||||
runTabLayout->addWidget(m_runOptions);
|
||||
|
||||
QVBoxLayout *runVLayout = new QVBoxLayout;
|
||||
runLayout->addLayout(runVLayout);
|
||||
QHBoxLayout *runVHLayout = new QHBoxLayout;
|
||||
OHBoxLayout *runVHLayout = new OHBoxLayout;
|
||||
runVLayout->addLayout(runVHLayout);
|
||||
runVHLayout->addWidget(m_run);
|
||||
runVHLayout->addWidget(m_runStatus);
|
||||
|
||||
QHBoxLayout *runVH2Layout = new QHBoxLayout;
|
||||
OHBoxLayout *runVH2Layout = new OHBoxLayout;
|
||||
runVLayout->addLayout(runVH2Layout);
|
||||
m_launchHtml = new QPushButton(tr("Show HTML output"));
|
||||
m_launchHtml = new OPushButton(tr("Show HTML output"));
|
||||
runVH2Layout->addWidget(m_launchHtml);
|
||||
runVH2Layout->addStretch(1); // to have launch button not being stretched
|
||||
|
||||
|
|
@ -154,40 +154,40 @@ MainWindow::MainWindow()
|
|||
QVBoxLayout *saveLayout = new QVBoxLayout;
|
||||
runLayout->addLayout(saveLayout);
|
||||
saveLayout->addWidget(m_saveLog);
|
||||
saveLayout->setAlignment(Qt::AlignTop);
|
||||
saveLayout->setAlignment(OGG::AlignTop);
|
||||
// saveLayout->addWidget(new QWidget); // to have the save button at the top
|
||||
|
||||
// output produced by Doxygen
|
||||
// output produced by analyze
|
||||
runTabLayout->addLayout(runLayout);
|
||||
runTabLayout->addWidget(new QLabel(tr("Output produced by doxygen")));
|
||||
QGridLayout *grid = new QGridLayout;
|
||||
//m_outputLog = new QTextEdit;
|
||||
m_outputLog = new QTextBrowser;
|
||||
//m_outputLog = new QPlainTextEdit;
|
||||
runTabLayout->addWidget(new QLabel(tr("Output produced by analyze")));
|
||||
OGridLayout *grid = new OGridLayout;
|
||||
//m_outputLog = new OGGextEdit;
|
||||
m_outputLog = new OGGextBrowser;
|
||||
//m_outputLog = new OPlainTextEdit;
|
||||
m_outputLog->setReadOnly(true);
|
||||
m_outputLog->setFontFamily(QString::fromLatin1("courier"));
|
||||
m_outputLog->setFontFamily(OString::fromLatin1("courier"));
|
||||
m_outputLog->setMinimumWidth(600);
|
||||
grid->addWidget(m_outputLog,0,0);
|
||||
grid->setColumnStretch(0,1);
|
||||
grid->setRowStretch(0,1);
|
||||
runTabLayout->addLayout(grid);
|
||||
|
||||
m_tabs = new QTabWidget;
|
||||
m_tabs = new OGGabWidget;
|
||||
m_tabs->addTab(m_wizard,tr("Wizard"));
|
||||
m_tabs->addTab(m_expert,tr("Expert"));
|
||||
m_tabs->addTab(m_runTab,tr("Run"));
|
||||
|
||||
rowLayout->addWidget(new QLabel(tr("Specify the working directory from which doxygen will run")));
|
||||
rowLayout->addWidget(new QLabel(tr("Specify the working directory from which analyze will run")));
|
||||
rowLayout->addLayout(dirLayout);
|
||||
rowLayout->addWidget(new QLabel(tr("Configure doxygen using the Wizard and/or Expert tab, then switch to the Run tab to generate the documentation")));
|
||||
rowLayout->addWidget(new QLabel(tr("Configure analyze using the Wizard and/or Expert tab, then switch to the Run tab to generate the documentation")));
|
||||
mainLayout->addWidget(m_tabs);
|
||||
|
||||
setCentralWidget(mainPart);
|
||||
statusBar()->showMessage(tr("Welcome to Doxygen"),messageTimeout);
|
||||
statusBar()->showMessage(tr("Welcome to analyze"),messageTimeout);
|
||||
|
||||
m_runProcess = new QProcess;
|
||||
m_runProcess = new OProcess;
|
||||
m_running = false;
|
||||
m_timer = new QTimer;
|
||||
m_timer = new OGGimer;
|
||||
|
||||
// connect signals and slots
|
||||
connect(m_tabs,SIGNAL(currentChanged(int)),SLOT(selectTab(int)));
|
||||
|
|
@ -195,9 +195,9 @@ MainWindow::MainWindow()
|
|||
connect(m_recentMenu,SIGNAL(triggered(QAction*)),SLOT(openRecent(QAction*)));
|
||||
connect(m_workingDir,SIGNAL(returnPressed()),SLOT(updateWorkingDir()));
|
||||
connect(m_runProcess,SIGNAL(readyReadStandardOutput()),SLOT(readStdout()));
|
||||
connect(m_runProcess,SIGNAL(finished(int, QProcess::ExitStatus)),SLOT(runComplete()));
|
||||
connect(m_runProcess,SIGNAL(finished(int, OProcess::ExitStatus)),SLOT(runComplete()));
|
||||
connect(m_timer,SIGNAL(timeout()),SLOT(readStdout()));
|
||||
connect(m_run,SIGNAL(clicked()),SLOT(runDoxygen()));
|
||||
connect(m_run,SIGNAL(clicked()),SLOT(runanalyze()));
|
||||
connect(m_launchHtml,SIGNAL(clicked()),SLOT(showHtmlOutput()));
|
||||
connect(m_saveLog,SIGNAL(clicked()),SLOT(saveLog()));
|
||||
connect(showSettings,SIGNAL(clicked()),SLOT(showSettings()));
|
||||
|
|
@ -212,7 +212,7 @@ MainWindow::MainWindow()
|
|||
m_wizard->refresh();
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *event)
|
||||
void MainWindow::closeEvent(OGloseEvent *event)
|
||||
{
|
||||
if (discardUnsavedChanges())
|
||||
{
|
||||
|
|
@ -238,7 +238,7 @@ void MainWindow::quit()
|
|||
QApplication::exit(0);
|
||||
}
|
||||
|
||||
void MainWindow::setWorkingDir(const QString &dirName)
|
||||
void MainWindow::setWorkingDir(const OString &dirName)
|
||||
{
|
||||
QDir::setCurrent(dirName);
|
||||
m_workingDir->setText(dirName);
|
||||
|
|
@ -248,7 +248,7 @@ void MainWindow::setWorkingDir(const QString &dirName)
|
|||
|
||||
void MainWindow::selectWorkingDir()
|
||||
{
|
||||
QString dirName = QFileDialog::getExistingDirectory(this,
|
||||
OString dirName = QFileDialog::getExistingDirectory(this,
|
||||
tr("Select working directory"),m_workingDir->text());
|
||||
if (!dirName.isEmpty())
|
||||
{
|
||||
|
|
@ -263,35 +263,35 @@ void MainWindow::updateWorkingDir()
|
|||
|
||||
void MainWindow::manual()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(QString::fromLatin1("https://www.doxygen.org/manual/index.html")));
|
||||
QDesktopServices::openUrl(QUrl(OString::fromLatin1("https://www.analyze.org/manual/index.html")));
|
||||
}
|
||||
|
||||
void MainWindow::about()
|
||||
{
|
||||
QString msg;
|
||||
QTextStream t(&msg,QIODevice::WriteOnly);
|
||||
t << QString::fromLatin1("<qt><center>A tool to configure and run doxygen version ")+
|
||||
QString::fromLatin1(getDoxygenVersion().c_str())+
|
||||
QString::fromLatin1(" on your source files.</center>")+
|
||||
QString::fromLatin1("<center>(Created with Qt version ")+
|
||||
QString::fromLatin1(QT_VERSION_STR);
|
||||
if (qstrcmp(qVersion(),QT_VERSION_STR))
|
||||
OString msg;
|
||||
OGGextStream t(&msg,QIODevice::WriteOnly);
|
||||
t << OString::fromLatin1("<OGG><center>A tool to configure and run analyze version ")+
|
||||
OString::fromLatin1(getanalyzeVersion().c_str())+
|
||||
OString::fromLatin1(" on your source files.</center>")+
|
||||
OString::fromLatin1("<center>(Created with OGG version ")+
|
||||
OString::fromLatin1(OGG_VERSION_STR);
|
||||
if (OStrcmp(qVersion(),OGG_VERSION_STR))
|
||||
{
|
||||
t << QString::fromLatin1(", running with ")+
|
||||
QString::fromLatin1(qVersion());
|
||||
t << OString::fromLatin1(", running with ")+
|
||||
OString::fromLatin1(qVersion());
|
||||
}
|
||||
t << QString::fromLatin1(")</center><p><br>"
|
||||
t << OString::fromLatin1(")</center><p><br>"
|
||||
"<center>Written by<br> Dimitri van Heesch<br>© 2000-");
|
||||
t << QDate::currentDate().year();
|
||||
t << QString::fromLatin1("</center><p></qt>");
|
||||
QMessageBox::about(this,tr("Doxygen GUI"),msg);
|
||||
t << OString::fromLatin1("</center><p></OGG>");
|
||||
QMessageBox::about(this,tr("analyze GUI"),msg);
|
||||
}
|
||||
|
||||
void MainWindow::openConfig()
|
||||
{
|
||||
if (discardUnsavedChanges(false))
|
||||
{
|
||||
QString fn = QFileDialog::getOpenFileName(this,
|
||||
OString fn = QFileDialog::getOpenFileName(this,
|
||||
tr("Open configuration file"),
|
||||
m_workingDir->text());
|
||||
if (!fn.isEmpty())
|
||||
|
|
@ -301,22 +301,22 @@ void MainWindow::openConfig()
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::updateConfigFileName(const QString &fileName)
|
||||
void MainWindow::updateConfigFileName(const OString &fileName)
|
||||
{
|
||||
if (m_fileName!=fileName)
|
||||
{
|
||||
m_fileName = fileName;
|
||||
QString curPath = QFileInfo(fileName).path();
|
||||
OString curPath = QFileInfo(fileName).path();
|
||||
setWorkingDir(curPath);
|
||||
addRecentFile(fileName);
|
||||
updateTitle();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::loadConfigFromFile(const QString & fileName)
|
||||
void MainWindow::loadConfigFromFile(const OString & fileName)
|
||||
{
|
||||
// save full path info of original file
|
||||
QString absFileName = QFileInfo(fileName).absoluteFilePath();
|
||||
OString absFileName = QFileInfo(fileName).absoluteFilePath();
|
||||
// updates the current directory
|
||||
updateConfigFileName(fileName);
|
||||
// open the specified configuration file
|
||||
|
|
@ -327,7 +327,7 @@ void MainWindow::loadConfigFromFile(const QString & fileName)
|
|||
updateTitle();
|
||||
}
|
||||
|
||||
void MainWindow::saveConfig(const QString &fileName)
|
||||
void MainWindow::saveConfig(const OString &fileName)
|
||||
{
|
||||
if (fileName.isEmpty()) return;
|
||||
QFile f(fileName);
|
||||
|
|
@ -335,11 +335,11 @@ void MainWindow::saveConfig(const QString &fileName)
|
|||
{
|
||||
QMessageBox::warning(this,
|
||||
tr("Error saving"),
|
||||
QString(tr("Error: cannot open the file "))+fileName+tr(" for writing!\n")+
|
||||
tr("Reason given: ")+QString::number(f.error()));
|
||||
OString(tr("Error: cannot open the file "))+fileName+tr(" for writing!\n")+
|
||||
tr("Reason given: ")+OString::number(f.error()));
|
||||
return;
|
||||
}
|
||||
QTextStream t(&f);
|
||||
OGGextStream t(&f);
|
||||
t.device()->setTextModeEnabled(false);
|
||||
m_expert->writeConfig(t,false,false,false);
|
||||
updateConfigFileName(fileName);
|
||||
|
|
@ -362,8 +362,8 @@ bool MainWindow::saveConfig()
|
|||
|
||||
bool MainWindow::saveConfigAs()
|
||||
{
|
||||
QString fileName = QFileDialog::getSaveFileName(this, QString(),
|
||||
m_workingDir->text()+QString::fromLatin1("/Doxyfile"));
|
||||
OString fileName = QFileDialog::getSaveFileName(this, OString(),
|
||||
m_workingDir->text()+OString::fromLatin1("/analzfile"));
|
||||
if (fileName.isEmpty()) return false;
|
||||
saveConfig(fileName);
|
||||
return true;
|
||||
|
|
@ -373,13 +373,13 @@ void MainWindow::makeDefaults()
|
|||
{
|
||||
if (QMessageBox::question(this,tr("Use current setting at startup?"),
|
||||
tr("Do you want to save the current settings "
|
||||
"and use them next time Doxywizard starts?"),
|
||||
"and use them next time analzwizard starts?"),
|
||||
QMessageBox::Save|
|
||||
QMessageBox::Cancel)==QMessageBox::Save)
|
||||
{
|
||||
//printf("MainWindow:makeDefaults()\n");
|
||||
m_expert->saveSettings(&m_settings);
|
||||
m_settings.setValue(QString::fromLatin1("wizard/loadsettings"), true);
|
||||
m_settings.setValue(OString::fromLatin1("wizard/loadsettings"), true);
|
||||
m_settings.sync();
|
||||
}
|
||||
}
|
||||
|
|
@ -396,7 +396,7 @@ void MainWindow::clearRecent()
|
|||
m_recentFiles.clear();
|
||||
for (int i=0;i<MAX_RECENT_FILES;i++)
|
||||
{
|
||||
m_settings.setValue(QString::fromLatin1("recent/config%1").arg(i),QString::fromLatin1(""));
|
||||
m_settings.setValue(OString::fromLatin1("recent/config%1").arg(i),OString::fromLatin1(""));
|
||||
}
|
||||
m_clearRecent->setEnabled(false);
|
||||
m_recentMenu->setEnabled(false);
|
||||
|
|
@ -415,7 +415,7 @@ void MainWindow::resetToDefaults()
|
|||
{
|
||||
//printf("MainWindow:resetToDefaults()\n");
|
||||
m_expert->resetToDefaults();
|
||||
m_settings.setValue(QString::fromLatin1("wizard/loadsettings"), false);
|
||||
m_settings.setValue(OString::fromLatin1("wizard/loadsettings"), false);
|
||||
m_settings.sync();
|
||||
m_modified = false;
|
||||
updateTitle();
|
||||
|
|
@ -425,11 +425,11 @@ void MainWindow::resetToDefaults()
|
|||
|
||||
void MainWindow::loadSettings()
|
||||
{
|
||||
QVariant geometry = m_settings.value(QString::fromLatin1("main/geometry"));
|
||||
QVariant state = m_settings.value(QString::fromLatin1("main/state"));
|
||||
QVariant wizState = m_settings.value(QString::fromLatin1("wizard/state"));
|
||||
QVariant loadSettings = m_settings.value(QString::fromLatin1("wizard/loadsettings"));
|
||||
QVariant workingDir = m_settings.value(QString::fromLatin1("wizard/workingdir"));
|
||||
QVariant geometry = m_settings.value(OString::fromLatin1("main/geometry"));
|
||||
QVariant state = m_settings.value(OString::fromLatin1("main/state"));
|
||||
QVariant wizState = m_settings.value(OString::fromLatin1("wizard/state"));
|
||||
QVariant loadSettings = m_settings.value(OString::fromLatin1("wizard/loadsettings"));
|
||||
QVariant workingDir = m_settings.value(OString::fromLatin1("wizard/workingdir"));
|
||||
|
||||
if (!geometry.isNull()) restoreGeometry(geometry.toByteArray());
|
||||
if (!state.isNull()) restoreState (state.toByteArray());
|
||||
|
|
@ -446,7 +446,7 @@ void MainWindow::loadSettings()
|
|||
/* due to prepend use list in reversed order */
|
||||
for (int i=MAX_RECENT_FILES;i>=0;i--)
|
||||
{
|
||||
QString entry = m_settings.value(QString::fromLatin1("recent/config%1").arg(i)).toString();
|
||||
OString entry = m_settings.value(OString::fromLatin1("recent/config%1").arg(i)).toString();
|
||||
if (!entry.isEmpty() && QFileInfo(entry).exists())
|
||||
{
|
||||
addRecentFileList(entry);
|
||||
|
|
@ -458,12 +458,12 @@ void MainWindow::loadSettings()
|
|||
|
||||
void MainWindow::saveSettings()
|
||||
{
|
||||
QSettings settings(QString::fromLatin1("Doxygen.org"), QString::fromLatin1("Doxywizard"));
|
||||
OSettings settings(OString::fromLatin1("analyze.org"), OString::fromLatin1("analzwizard"));
|
||||
|
||||
m_settings.setValue(QString::fromLatin1("main/geometry"), saveGeometry());
|
||||
m_settings.setValue(QString::fromLatin1("main/state"), saveState());
|
||||
m_settings.setValue(QString::fromLatin1("wizard/state"), m_wizard->saveState());
|
||||
m_settings.setValue(QString::fromLatin1("wizard/workingdir"), m_workingDir->text());
|
||||
m_settings.setValue(OString::fromLatin1("main/geometry"), saveGeometry());
|
||||
m_settings.setValue(OString::fromLatin1("main/state"), saveState());
|
||||
m_settings.setValue(OString::fromLatin1("wizard/state"), m_wizard->saveState());
|
||||
m_settings.setValue(OString::fromLatin1("wizard/workingdir"), m_workingDir->text());
|
||||
}
|
||||
|
||||
void MainWindow::selectTab(int id)
|
||||
|
|
@ -477,12 +477,12 @@ void MainWindow::selectRunTab()
|
|||
m_tabs->setCurrentIndex(2);
|
||||
}
|
||||
|
||||
void MainWindow::addRecentFile(const QString &fileName)
|
||||
void MainWindow::addRecentFile(const OString &fileName)
|
||||
{
|
||||
addRecentFileList(fileName);
|
||||
updateRecentFile();
|
||||
}
|
||||
void MainWindow::addRecentFileList(const QString &fileName)
|
||||
void MainWindow::addRecentFileList(const OString &fileName)
|
||||
{
|
||||
int i=m_recentFiles.indexOf(fileName);
|
||||
if (i!=-1) m_recentFiles.removeAt(i);
|
||||
|
|
@ -505,14 +505,14 @@ void MainWindow::updateRecentFile(void)
|
|||
{
|
||||
m_recentMenu->clear();
|
||||
int i=0;
|
||||
foreach( QString str, m_recentFiles )
|
||||
foreach( OString str, m_recentFiles )
|
||||
{
|
||||
m_recentMenu->addAction(str);
|
||||
m_settings.setValue(QString::fromLatin1("recent/config%1").arg(i++),str);
|
||||
m_settings.setValue(OString::fromLatin1("recent/config%1").arg(i++),str);
|
||||
}
|
||||
for (;i<MAX_RECENT_FILES;i++)
|
||||
{
|
||||
m_settings.setValue(QString::fromLatin1("recent/config%1").arg(i),QString::fromLatin1(""));
|
||||
m_settings.setValue(OString::fromLatin1("recent/config%1").arg(i),OString::fromLatin1(""));
|
||||
}
|
||||
m_clearRecent->setEnabled(m_recentFiles.count()>0);
|
||||
m_recentMenu->setEnabled(m_recentFiles.count()>0);
|
||||
|
|
@ -527,78 +527,78 @@ void MainWindow::openRecent(QAction *action)
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::runDoxygenMenu()
|
||||
void MainWindow::runanalyzeMenu()
|
||||
{
|
||||
m_tabs->setCurrentWidget(m_runTab);
|
||||
runDoxygen();
|
||||
runanalyze();
|
||||
}
|
||||
|
||||
void MainWindow::runDoxygen()
|
||||
void MainWindow::runanalyze()
|
||||
{
|
||||
if (!m_running)
|
||||
{
|
||||
QString doxygenPath;
|
||||
OString analyzePath;
|
||||
#if defined(Q_OS_MACX)
|
||||
doxygenPath = qApp->applicationDirPath()+QString::fromLatin1("/../Resources/");
|
||||
qDebug() << tr("Doxygen path: ") << doxygenPath;
|
||||
if ( !QFile(doxygenPath + QString::fromLatin1("doxygen")).exists() )
|
||||
analyzePath = qApp->applicationDirPath()+OString::fromLatin1("/../Resources/");
|
||||
qDebug() << tr("analyze path: ") << analyzePath;
|
||||
if ( !QFile(analyzePath + OString::fromLatin1("analyze")).exists() )
|
||||
{
|
||||
// No Doxygen binary in the resources, if there is a system Doxygen binary, use that instead
|
||||
if ( QFile(QString::fromLatin1("/usr/local/bin/doxygen")).exists() )
|
||||
// No analyze binary in the resources, if there is a system analyze binary, use that instead
|
||||
if ( QFile(OString::fromLatin1("/usr/local/bin/analyze")).exists() )
|
||||
{
|
||||
doxygenPath = QString::fromLatin1("/usr/local/bin/");
|
||||
analyzePath = OString::fromLatin1("/usr/local/bin/");
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << tr("Can't find the doxygen command, make sure it's in your $$PATH");
|
||||
doxygenPath = QString::fromLatin1("");
|
||||
qDebug() << tr("Can't find the analyze command, make sure it's in your $$PATH");
|
||||
analyzePath = OString::fromLatin1("");
|
||||
}
|
||||
}
|
||||
qDebug() << tr("Getting doxygen from: ") << doxygenPath;
|
||||
qDebug() << tr("Getting analyze from: ") << analyzePath;
|
||||
#endif
|
||||
|
||||
m_runProcess->setReadChannel(QProcess::StandardOutput);
|
||||
m_runProcess->setProcessChannelMode(QProcess::MergedChannels);
|
||||
m_runProcess->setReadChannel(OProcess::StandardOutput);
|
||||
m_runProcess->setProcessChannelMode(OProcess::MergedChannels);
|
||||
m_runProcess->setWorkingDirectory(m_workingDir->text());
|
||||
QStringList env=QProcess::systemEnvironment();
|
||||
OStringList env=OProcess::systemEnvironment();
|
||||
// set PWD environment variable to m_workingDir
|
||||
env.replaceInStrings(QRegularExpression(QString::fromLatin1("^PWD=(.*)"),QRegularExpression::CaseInsensitiveOption),
|
||||
QString::fromLatin1("PWD=")+m_workingDir->text());
|
||||
env.replaceInStrings(QRegularExpression(OString::fromLatin1("^PWD=(.*)"),QRegularExpression::CaseInsensitiveOption),
|
||||
OString::fromLatin1("PWD=")+m_workingDir->text());
|
||||
m_runProcess->setEnvironment(env);
|
||||
|
||||
QStringList args;
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
||||
QStringList runOptions = m_runOptions->text().split(QLatin1Char(' '),QString::SkipEmptyParts);
|
||||
OStringList args;
|
||||
#if OGG_VERSION < OGG_VERSION_CHECK(5, 15, 0)
|
||||
OStringList runOptions = m_runOptions->text().split(QLatin1Char(' '),OString::SkipEmptyParts);
|
||||
#else
|
||||
QStringList runOptions = m_runOptions->text().split(QLatin1Char(' '),Qt::SkipEmptyParts);
|
||||
OStringList runOptions = m_runOptions->text().split(QLatin1Char(' '),OGG::SkipEmptyParts);
|
||||
#endif
|
||||
|
||||
args << runOptions;
|
||||
args << QString::fromLatin1("-b"); // make stdout unbuffered
|
||||
args << QString::fromLatin1("-"); // read config from stdin
|
||||
args << OString::fromLatin1("-b"); // make stdout unbuffered
|
||||
args << OString::fromLatin1("-"); // read config from stdin
|
||||
|
||||
m_outputLog->clear();
|
||||
m_runProcess->start(doxygenPath + QString::fromLatin1("doxygen"), args);
|
||||
m_runProcess->start(analyzePath + OString::fromLatin1("analyze"), args);
|
||||
|
||||
if (!m_runProcess->waitForStarted())
|
||||
{
|
||||
m_outputLog->append(APPQT(QString::fromLatin1("*** Failed to run doxygen\n")));
|
||||
m_outputLog->append(APPOGG(OString::fromLatin1("*** Failed to run analyze\n")));
|
||||
return;
|
||||
}
|
||||
QTextStream t(m_runProcess);
|
||||
OGGextStream t(m_runProcess);
|
||||
m_expert->writeConfig(t,false,false,false);
|
||||
t.flush();
|
||||
m_runProcess->closeWriteChannel();
|
||||
|
||||
if (m_runProcess->state() == QProcess::NotRunning)
|
||||
if (m_runProcess->state() == OProcess::NotRunning)
|
||||
{
|
||||
m_outputLog->append(APPQT(QString::fromLatin1("*** Failed to run doxygen\n")));
|
||||
m_outputLog->append(APPOGG(OString::fromLatin1("*** Failed to run analyze\n")));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_saveLog->setEnabled(false);
|
||||
m_running=true;
|
||||
m_run->setText(tr("Stop doxygen"));
|
||||
m_run->setText(tr("Stop analyze"));
|
||||
m_runMenu->setEnabled(false);
|
||||
m_runStatus->setText(tr("Status: running"));
|
||||
m_timer->start(1000);
|
||||
|
|
@ -607,7 +607,7 @@ void MainWindow::runDoxygen()
|
|||
else
|
||||
{
|
||||
m_running=false;
|
||||
m_run->setText(tr("Run doxygen"));
|
||||
m_run->setText(tr("Run analyze"));
|
||||
m_runStatus->setText(tr("Status: not running"));
|
||||
m_runProcess->kill();
|
||||
m_timer->stop();
|
||||
|
|
@ -620,16 +620,16 @@ void MainWindow::readStdout()
|
|||
if (m_running)
|
||||
{
|
||||
QByteArray data = m_runProcess->readAllStandardOutput();
|
||||
QString text = QString::fromUtf8(data);
|
||||
OString text = OString::fromUtf8(data);
|
||||
if (!text.isEmpty())
|
||||
{
|
||||
QScrollBar *vbar = m_outputLog->verticalScrollBar();
|
||||
OScrollBar *vbar = m_outputLog->verticalScrollBar();
|
||||
|
||||
const QTextCursor old_cursor = m_outputLog->textCursor();
|
||||
const OGGextCursor old_cursor = m_outputLog->textCursor();
|
||||
const bool is_scrolled_up = vbar->value() == vbar->maximum();
|
||||
const int distanceFromBottom = vbar->minimum() - vbar->value();
|
||||
|
||||
m_outputLog->moveCursor(QTextCursor::End);
|
||||
m_outputLog->moveCursor(OGGextCursor::End);
|
||||
|
||||
m_outputLog->insertPlainText(text);
|
||||
|
||||
|
|
@ -640,7 +640,7 @@ void MainWindow::readStdout()
|
|||
}
|
||||
else
|
||||
{
|
||||
m_outputLog->moveCursor(QTextCursor::End);
|
||||
m_outputLog->moveCursor(OGGextCursor::End);
|
||||
vbar->setValue(m_outputLog->verticalScrollBar()->maximum());
|
||||
}
|
||||
}
|
||||
|
|
@ -651,14 +651,14 @@ void MainWindow::runComplete()
|
|||
{
|
||||
if (m_running)
|
||||
{
|
||||
m_outputLog->append(APPQT(tr("*** Doxygen has finished\n")));
|
||||
m_outputLog->append(APPOGG(tr("*** analyze has finished\n")));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_outputLog->append(APPQT(tr("*** Canceled by user\n")));
|
||||
m_outputLog->append(APPOGG(tr("*** Canceled by user\n")));
|
||||
}
|
||||
m_outputLog->ensureCursorVisible();
|
||||
m_run->setText(tr("Run doxygen"));
|
||||
m_run->setText(tr("Run analyze"));
|
||||
m_runStatus->setText(tr("Status: not running"));
|
||||
m_running=false;
|
||||
m_runMenu->setEnabled(true);
|
||||
|
|
@ -677,14 +677,14 @@ void MainWindow::updateLaunchButtonState()
|
|||
|
||||
void MainWindow::showHtmlOutput()
|
||||
{
|
||||
QString indexFile = m_expert->getHtmlOutputIndex(m_workingDir->text());
|
||||
OString indexFile = m_expert->getHtmlOutputIndex(m_workingDir->text());
|
||||
QFileInfo fi(indexFile);
|
||||
// TODO: the following doesn't seem to work with IE
|
||||
#ifdef _WIN32
|
||||
//QString indexUrl(QString::fromLatin1("file:///"));
|
||||
//OString indexUrl(OString::fromLatin1("file:///"));
|
||||
ShellExecute(nullptr, L"open", (LPCWSTR)fi.absoluteFilePath().utf16(), nullptr, nullptr, SW_SHOWNORMAL);
|
||||
#else
|
||||
QString indexUrl(QString::fromLatin1("file://"));
|
||||
OString indexUrl(OString::fromLatin1("file://"));
|
||||
indexUrl+=fi.absoluteFilePath();
|
||||
QDesktopServices::openUrl(QUrl(indexUrl));
|
||||
#endif
|
||||
|
|
@ -692,15 +692,15 @@ void MainWindow::showHtmlOutput()
|
|||
|
||||
void MainWindow::saveLog()
|
||||
{
|
||||
QString fn = QFileDialog::getSaveFileName(this, tr("Save log file"),
|
||||
OString fn = QFileDialog::getSaveFileName(this, tr("Save log file"),
|
||||
m_workingDir->text()+
|
||||
QString::fromLatin1("/doxygen_log.txt"));
|
||||
OString::fromLatin1("/analyze_log.txt"));
|
||||
if (!fn.isEmpty())
|
||||
{
|
||||
QFile f(fn);
|
||||
if (f.open(QIODevice::WriteOnly))
|
||||
{
|
||||
QTextStream t(&f);
|
||||
OGGextStream t(&f);
|
||||
t << m_outputLog->toPlainText();
|
||||
statusBar()->showMessage(tr("Output log saved"),messageTimeout);
|
||||
}
|
||||
|
|
@ -714,8 +714,8 @@ void MainWindow::saveLog()
|
|||
|
||||
void MainWindow::showSettings()
|
||||
{
|
||||
QString text;
|
||||
QTextStream t(&text);
|
||||
OString text;
|
||||
OGGextStream t(&text);
|
||||
if (m_showCondensedSettings->isChecked())
|
||||
{
|
||||
m_expert->writeConfig(t,true,true,true);
|
||||
|
|
@ -725,7 +725,7 @@ void MainWindow::showSettings()
|
|||
m_expert->writeConfig(t,true,false,true);
|
||||
}
|
||||
m_outputLog->clear();
|
||||
m_outputLog->append(APPQT(text));
|
||||
m_outputLog->append(APPOGG(text));
|
||||
m_outputLog->ensureCursorVisible();
|
||||
m_saveLog->setEnabled(true);
|
||||
}
|
||||
|
|
@ -738,15 +738,15 @@ void MainWindow::configChanged()
|
|||
|
||||
void MainWindow::updateTitle()
|
||||
{
|
||||
QString title = tr("Doxygen GUI frontend");
|
||||
OString title = tr("analyze GUI frontend");
|
||||
m_resetDefault->setEnabled(m_modified);
|
||||
if (m_modified)
|
||||
{
|
||||
title+=QString::fromLatin1(" +");
|
||||
title+=OString::fromLatin1(" +");
|
||||
}
|
||||
if (!m_fileName.isEmpty())
|
||||
{
|
||||
title+=QString::fromLatin1(" (")+m_fileName+QString::fromLatin1(")");
|
||||
title+=OString::fromLatin1(" (")+m_fileName+OString::fromLatin1(")");
|
||||
}
|
||||
setWindowTitle(title);
|
||||
}
|
||||
|
|
@ -789,10 +789,10 @@ void MainWindow::outputLogStart()
|
|||
m_outputLogTextCount = 0;
|
||||
m_outputLog->clear();
|
||||
}
|
||||
void MainWindow::outputLogText(QString text)
|
||||
void MainWindow::outputLogText(OString text)
|
||||
{
|
||||
m_outputLogTextCount++;
|
||||
m_outputLog->append(APPQT(text));
|
||||
m_outputLog->append(APPOGG(text));
|
||||
}
|
||||
void MainWindow::outputLogFinish()
|
||||
{
|
||||
|
|
@ -807,12 +807,12 @@ void MainWindow::outputLogFinish()
|
|||
//-----------------------------------------------------------------------
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
static const char ENV_VAR_QT_DEVICE_PIXEL_RATIO[] = "QT_DEVICE_PIXEL_RATIO";
|
||||
if (!qEnvironmentVariableIsSet(ENV_VAR_QT_DEVICE_PIXEL_RATIO)
|
||||
&& !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR")
|
||||
&& !qEnvironmentVariableIsSet("QT_SCALE_FACTOR")
|
||||
&& !qEnvironmentVariableIsSet("QT_SCREEN_SCALE_FACTORS")) {
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
static const char ENV_VAR_OGG_DEVICE_PIXEL_RATIO[] = "OGG_DEVICE_PIXEL_RATIO";
|
||||
if (!qEnvironmentVariableIsSet(ENV_VAR_OGG_DEVICE_PIXEL_RATIO)
|
||||
&& !qEnvironmentVariableIsSet("OGG_AUTO_SCREEN_SCALE_FACTOR")
|
||||
&& !qEnvironmentVariableIsSet("OGG_SCALE_FACTOR")
|
||||
&& !qEnvironmentVariableIsSet("OGG_SCREEN_SCALE_FACTORS")) {
|
||||
OGoreApplication::setAttribute(OGG::AA_EnableHighDpiScaling);
|
||||
}
|
||||
|
||||
QApplication a(argc,argv);
|
||||
|
|
@ -820,38 +820,38 @@ int main(int argc,char **argv)
|
|||
|
||||
if (locArgc == 2)
|
||||
{
|
||||
if (!qstrcmp(argv[1],"--help"))
|
||||
if (!OStrcmp(argv[1],"--help"))
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(QString::fromLatin1("Usage: %1 [config file]").arg(QString::fromLatin1(argv[0])));
|
||||
msgBox.setText(OString::fromLatin1("Usage: %1 [config file]").arg(OString::fromLatin1(argv[0])));
|
||||
msgBox.exec();
|
||||
exit(0);
|
||||
}
|
||||
else if (!qstrcmp(argv[1],"--version"))
|
||||
else if (!OStrcmp(argv[1],"--version"))
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
if (!qstrcmp(qVersion(),QT_VERSION_STR))
|
||||
if (!OStrcmp(qVersion(),OGG_VERSION_STR))
|
||||
{
|
||||
msgBox.setText(QString::fromLatin1("Doxywizard version: %1, Qt version: %2").arg(QString::fromLatin1(getFullVersion().c_str()),QString::fromLatin1(QT_VERSION_STR)));
|
||||
msgBox.setText(OString::fromLatin1("analzwizard version: %1, OGG version: %2").arg(OString::fromLatin1(getFullVersion().c_str()),OString::fromLatin1(OGG_VERSION_STR)));
|
||||
}
|
||||
else
|
||||
{
|
||||
msgBox.setText(QString::fromLatin1("Doxywizard version: %1, Qt version: created with %2, running with %3").arg(QString::fromLatin1(getFullVersion().c_str()),QString::fromLatin1(QT_VERSION_STR),QString::fromLatin1(qVersion())));
|
||||
msgBox.setText(OString::fromLatin1("analzwizard version: %1, OGG version: created with %2, running with %3").arg(OString::fromLatin1(getFullVersion().c_str()),OString::fromLatin1(OGG_VERSION_STR),OString::fromLatin1(qVersion())));
|
||||
}
|
||||
msgBox.exec();
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
if (!qstrcmp(argv[1],"--debug") && ((locArgc == 2) || (locArgc == 3)))
|
||||
if (!OStrcmp(argv[1],"--debug") && ((locArgc == 2) || (locArgc == 3)))
|
||||
{
|
||||
DoxygenWizard::debugFlag = true;
|
||||
analyzeWizard::debugFlag = true;
|
||||
locArgc--;
|
||||
}
|
||||
|
||||
if (locArgc > 2)
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(QString::fromLatin1("Too many arguments specified\n\nUsage: %1 [config file]").arg(QString::fromLatin1(argv[0])));
|
||||
msgBox.setText(OString::fromLatin1("Too many arguments specified\n\nUsage: %1 [config file]").arg(OString::fromLatin1(argv[0])));
|
||||
msgBox.exec();
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -860,7 +860,7 @@ int main(int argc,char **argv)
|
|||
MainWindow &main = MainWindow::instance();
|
||||
if (locArgc==2 && argv[argc-1][0]!='-') // name of config file as an argument
|
||||
{
|
||||
main.loadConfigFromFile(QString::fromLocal8Bit(argv[argc-1]));
|
||||
main.loadConfigFromFile(OString::fromLocal8Bit(argv[argc-1]));
|
||||
}
|
||||
main.show();
|
||||
return a.exec();
|
||||
|
|
@ -10,24 +10,24 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef DOXYWIZARD_H
|
||||
#define DOXYWIZARD_H
|
||||
#ifndef analzWIZARD_H
|
||||
#define analzWIZARD_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QSettings>
|
||||
#include <QStringList>
|
||||
#include <OSettings>
|
||||
#include <OStringList>
|
||||
|
||||
class Expert;
|
||||
class Wizard;
|
||||
class QLabel;
|
||||
class QCheckBox;
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
class QTextBrowser;
|
||||
class OPushButton;
|
||||
class QGGextBrowser;
|
||||
class QMenu;
|
||||
class QProcess;
|
||||
class QTimer;
|
||||
class QTabWidget;
|
||||
class OProcess;
|
||||
class QGGimer;
|
||||
class QGGabWidget;
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
|
|
@ -35,15 +35,15 @@ class MainWindow : public QMainWindow
|
|||
|
||||
public:
|
||||
static MainWindow &instance();
|
||||
void loadConfigFromFile(const QString &fileName);
|
||||
void loadConfigFromFile(const OString &fileName);
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
QString configFileName() const { return m_fileName; }
|
||||
OString configFileName() const { return m_fileName; }
|
||||
void updateTitle();
|
||||
// access routines for outputLog pane
|
||||
void outputLogStart();
|
||||
void outputLogText(QString text);
|
||||
void outputLogText(OString text);
|
||||
void outputLogFinish();
|
||||
|
||||
public slots:
|
||||
|
|
@ -61,8 +61,8 @@ class MainWindow : public QMainWindow
|
|||
void openRecent(QAction *action);
|
||||
void selectWorkingDir();
|
||||
void updateWorkingDir();
|
||||
void runDoxygen();
|
||||
void runDoxygenMenu();
|
||||
void runanalyze();
|
||||
void runanalyzeMenu();
|
||||
void readStdout();
|
||||
void runComplete();
|
||||
void showHtmlOutput();
|
||||
|
|
@ -74,48 +74,48 @@ class MainWindow : public QMainWindow
|
|||
|
||||
private:
|
||||
MainWindow();
|
||||
void saveConfig(const QString &fileName);
|
||||
void addRecentFile(const QString &fileName);
|
||||
void addRecentFileList(const QString &fileName);
|
||||
void saveConfig(const OString &fileName);
|
||||
void addRecentFile(const OString &fileName);
|
||||
void addRecentFileList(const OString &fileName);
|
||||
void updateRecentFile(void);
|
||||
void updateConfigFileName(const QString &fileName);
|
||||
void setWorkingDir(const QString &dirName);
|
||||
void updateConfigFileName(const OString &fileName);
|
||||
void setWorkingDir(const OString &dirName);
|
||||
void updateLaunchButtonState();
|
||||
bool discardUnsavedChanges(bool saveOption=true);
|
||||
|
||||
QLineEdit *m_workingDir;
|
||||
QLineEdit *m_runOptions;
|
||||
QPushButton *m_selWorkingDir;
|
||||
QPushButton *m_run;
|
||||
OPushButton *m_selWorkingDir;
|
||||
OPushButton *m_run;
|
||||
QAction *m_runMenu;
|
||||
QPushButton *m_saveLog;
|
||||
OPushButton *m_saveLog;
|
||||
QCheckBox *m_showCondensedSettings;
|
||||
QPushButton *m_launchHtml;
|
||||
QPushButton *m_launchPdf;
|
||||
QTextBrowser *m_outputLog;
|
||||
OPushButton *m_launchHtml;
|
||||
OPushButton *m_launchPdf;
|
||||
QGGextBrowser *m_outputLog;
|
||||
QLabel *m_runStatus;
|
||||
Expert *m_expert;
|
||||
Wizard *m_wizard;
|
||||
QWidget *m_runTab;
|
||||
QString m_fileName;
|
||||
QSettings m_settings;
|
||||
OString m_fileName;
|
||||
OSettings m_settings;
|
||||
QMenu *m_recentMenu;
|
||||
QStringList m_recentFiles;
|
||||
OStringList m_recentFiles;
|
||||
QAction *m_resetDefault;
|
||||
QAction *m_clearRecent;
|
||||
QProcess *m_runProcess;
|
||||
QTimer *m_timer;
|
||||
QTabWidget *m_tabs;
|
||||
OProcess *m_runProcess;
|
||||
QGGimer *m_timer;
|
||||
QGGabWidget *m_tabs;
|
||||
int m_outputLogTextCount = 0;
|
||||
bool m_running;
|
||||
bool m_modified;
|
||||
};
|
||||
|
||||
/*! \brief This class serves as a namespace for global variables used by the doxygen wizard.
|
||||
/*! \brief This class serves as a namespace for global variables used by the analyze wizard.
|
||||
*
|
||||
* All fields in this class are public and static, so they can be used directly.
|
||||
*/
|
||||
class DoxygenWizard
|
||||
class analyzeWizard
|
||||
{
|
||||
public:
|
||||
static bool debugFlag;
|
||||
|
|
@ -13,20 +13,20 @@
|
|||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include <QHash>
|
||||
#include <QString>
|
||||
#include <OHash>
|
||||
#include <OString>
|
||||
|
||||
#include "adapter.h"
|
||||
|
||||
class Input;
|
||||
class QTextStream;
|
||||
class QGGextStream;
|
||||
|
||||
bool parseConfig(
|
||||
const QString &fileName,
|
||||
const QHash<QString,Input *> &options
|
||||
const OString &fileName,
|
||||
const OHash<OString,Input *> &options
|
||||
);
|
||||
|
||||
void writeStringValue(QTextStream &t,TextCodecAdapter *codec,const QString &s,bool convert);
|
||||
void writeStringValue(QGGextStream &t,TextCodecAdapter *codec,const OString &s,bool convert);
|
||||
|
||||
// directly copied from ../../src/config.h to be consistent
|
||||
enum
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
%option never-interactive
|
||||
%option prefix="config_doxywYY"
|
||||
%option prefix="config_analzwYY"
|
||||
%top{
|
||||
#include <stdint.h>
|
||||
}
|
||||
|
|
@ -28,14 +28,14 @@
|
|||
#include "inputobsolete.h"
|
||||
#include "config_msg.h"
|
||||
|
||||
#include <QString>
|
||||
#include <OString>
|
||||
#include <QVariant>
|
||||
#include <QStack>
|
||||
#include <OStack>
|
||||
#include <QByteArray>
|
||||
#include <QFileInfo>
|
||||
#include <QStringList>
|
||||
#include <OStringList>
|
||||
#include <QRegularExpression>
|
||||
#include <QTextStream>
|
||||
#include <QGGextStream>
|
||||
#include <QMessageBox>
|
||||
|
||||
#define YY_NO_UNISTD_H 1
|
||||
|
|
@ -55,22 +55,22 @@ struct ConfigFileState
|
|||
FILE *file;
|
||||
YY_BUFFER_STATE oldState;
|
||||
YY_BUFFER_STATE newState;
|
||||
QString fileName;
|
||||
OString fileName;
|
||||
};
|
||||
|
||||
static const QHash<QString,Input*> *g_options=nullptr;
|
||||
static const OHash<OString,Input*> *g_options=nullptr;
|
||||
static FILE *g_file=nullptr;
|
||||
static QString g_yyFileName;
|
||||
static QString g_includeName;
|
||||
static OString g_yyFileName;
|
||||
static OString g_includeName;
|
||||
static QVariant g_includePathList;
|
||||
static QStack<ConfigFileState*> g_includeStack;
|
||||
static OStack<ConfigFileState*> g_includeStack;
|
||||
static int g_includeDepth=0;
|
||||
static QVariant *g_arg=nullptr;
|
||||
static Input *g_curOption=nullptr;
|
||||
static QByteArray g_str;
|
||||
static std::unique_ptr<TextCodecAdapter> g_codec = std::make_unique<TextCodecAdapter>("UTF-8");
|
||||
static QString g_codecName = QString::fromLatin1("UTF-8");
|
||||
static QString g_cmd;
|
||||
static OString g_codecName = OString::fromLatin1("UTF-8");
|
||||
static OString g_cmd;
|
||||
static bool g_isEnum=false;
|
||||
|
||||
static const char *stateToString(int state);
|
||||
|
|
@ -93,12 +93,12 @@ static int yyread(char *buf,int maxSize)
|
|||
}
|
||||
}
|
||||
|
||||
static void substEnvVarsInStrList(QStringList &sl);
|
||||
static void substEnvVarsInString(QString &s);
|
||||
static void substEnvVarsInStrList(OStringList &sl);
|
||||
static void substEnvVarsInString(OString &s);
|
||||
|
||||
static void checkEncoding()
|
||||
{
|
||||
Input *option = g_options->value(QString::fromLatin1("DOXYFILE_ENCODING"));
|
||||
Input *option = g_options->value(OString::fromLatin1("analzFILE_ENCODING"));
|
||||
if (option && option->value().toString()!=g_codecName)
|
||||
{
|
||||
auto newCodec = std::make_unique<TextCodecAdapter>(option->value().toString().toLatin1());
|
||||
|
|
@ -177,7 +177,7 @@ static void processString()
|
|||
{
|
||||
std::string str = g_str.trimmed().data();
|
||||
config_warn("Invalid value for '%s' tag at line %d, file %s: Value '%s' is not properly quoted\n",
|
||||
qPrintable(g_cmd),yylineno-1,qPrintable(g_yyFileName),str.c_str());
|
||||
OPrintable(g_cmd),yylineno-1,OPrintable(g_yyFileName),str.c_str());
|
||||
}
|
||||
warned=true;
|
||||
}
|
||||
|
|
@ -206,7 +206,7 @@ static void processString()
|
|||
|
||||
static void processList()
|
||||
{
|
||||
bool allowCommaAsSeparator = g_cmd!=QString::fromLatin1("PREDEFINED");
|
||||
bool allowCommaAsSeparator = g_cmd!=OString::fromLatin1("PREDEFINED");
|
||||
|
||||
const QByteArray s = stripComment(g_str.trimmed());
|
||||
int l = s.length();
|
||||
|
|
@ -271,7 +271,7 @@ static void processList()
|
|||
{
|
||||
std::string str = g_str.trimmed().data();
|
||||
config_warn("Invalid value for '%s' tag at line %d, file %s: Values in list '%s' are not properly space %sseparated\n",
|
||||
qPrintable(g_cmd),yylineno-1,qPrintable(g_yyFileName),str.c_str(),allowCommaAsSeparator?"or comma ":"");
|
||||
OPrintable(g_cmd),yylineno-1,OPrintable(g_yyFileName),str.c_str(),allowCommaAsSeparator?"or comma ":"");
|
||||
warned=true;
|
||||
}
|
||||
needsSeparator=false;
|
||||
|
|
@ -290,54 +290,54 @@ static void processList()
|
|||
{
|
||||
std::string str = g_str.trimmed().data();
|
||||
config_warn("Invalid value for '%s' tag at line %d, file %s: Values in list '%s' are not properly quoted\n",
|
||||
qPrintable(g_cmd),yylineno-1,qPrintable(g_yyFileName),str.c_str());
|
||||
OPrintable(g_cmd),yylineno-1,OPrintable(g_yyFileName),str.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static FILE *tryPath(const QString &path,const QString &fileName)
|
||||
static FILE *tryPath(const OString &path,const OString &fileName)
|
||||
{
|
||||
QString absName=!path.isEmpty() ? path+QString::fromLatin1("/")+fileName : fileName;
|
||||
OString absName=!path.isEmpty() ? path+OString::fromLatin1("/")+fileName : fileName;
|
||||
QFileInfo fi(absName);
|
||||
if (fi.exists() && fi.isFile())
|
||||
{
|
||||
FILE *f = fopen(absName.toLocal8Bit(),"r");
|
||||
if (f==nullptr)
|
||||
config_err("could not open file %s for reading\n",qPrintable(absName));
|
||||
config_err("could not open file %s for reading\n",OPrintable(absName));
|
||||
else
|
||||
return f;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static FILE *findFile(const QString &fileName)
|
||||
static FILE *findFile(const OString &fileName)
|
||||
{
|
||||
if (QFileInfo(fileName).isAbsolute()) // absolute path
|
||||
{
|
||||
return tryPath(QString(), fileName);
|
||||
return tryPath(OString(), fileName);
|
||||
}
|
||||
|
||||
// relative path, try with include paths in the list
|
||||
QStringList sl = g_includePathList.toStringList();
|
||||
OStringList sl = g_includePathList.toStringList();
|
||||
substEnvVarsInStrList(sl);
|
||||
foreach (QString s, sl)
|
||||
foreach (OString s, sl)
|
||||
{
|
||||
FILE *f = tryPath(s,fileName);
|
||||
if (f) return f;
|
||||
}
|
||||
// try cwd if g_includePathList fails
|
||||
return tryPath(QString::fromLatin1("."),fileName);
|
||||
return tryPath(OString::fromLatin1("."),fileName);
|
||||
}
|
||||
|
||||
static void readIncludeFile(const QString &incName)
|
||||
static void readIncludeFile(const OString &incName)
|
||||
{
|
||||
if (g_includeDepth==MAX_INCLUDE_DEPTH)
|
||||
{
|
||||
config_err("maximum include depth (%d) reached, %s is not included.",
|
||||
MAX_INCLUDE_DEPTH,qPrintable(incName));
|
||||
MAX_INCLUDE_DEPTH,OPrintable(incName));
|
||||
}
|
||||
|
||||
QString inc = incName;
|
||||
OString inc = incName;
|
||||
substEnvVarsInString(inc);
|
||||
inc = inc.trimmed();
|
||||
uint incLen = inc.length();
|
||||
|
|
@ -353,7 +353,7 @@ static void readIncludeFile(const QString &incName)
|
|||
// For debugging
|
||||
#if SHOW_INCLUDES
|
||||
for (i=0;i<includeStack.count();i++) msg(" ");
|
||||
msg("@INCLUDE = %s: parsing...\n",qPrintable(inc));
|
||||
msg("@INCLUDE = %s: parsing...\n",OPrintable(inc));
|
||||
#endif
|
||||
|
||||
// store the state of the old file
|
||||
|
|
@ -371,7 +371,7 @@ static void readIncludeFile(const QString &incName)
|
|||
}
|
||||
else
|
||||
{
|
||||
config_err("@INCLUDE = %s: not found!\n",qPrintable(inc));
|
||||
config_err("@INCLUDE = %s: not found!\n",OPrintable(inc));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -408,7 +408,7 @@ static const char *stateToString(int state);
|
|||
if (g_curOption==nullptr) // oops not known
|
||||
{
|
||||
config_warn("ignoring unsupported tag '%s' at line %d, file %s\n",
|
||||
qPrintable(g_cmd),yylineno,qPrintable(g_yyFileName));
|
||||
OPrintable(g_cmd),yylineno,OPrintable(g_yyFileName));
|
||||
BEGIN(SkipInvalid);
|
||||
}
|
||||
else // known tag
|
||||
|
|
@ -419,7 +419,7 @@ static const char *stateToString(int state);
|
|||
switch(g_curOption->kind())
|
||||
{
|
||||
case Input::StrList:
|
||||
*g_arg = QStringList();
|
||||
*g_arg = OStringList();
|
||||
BEGIN(GetStrList);
|
||||
break;
|
||||
case Input::String:
|
||||
|
|
@ -436,14 +436,14 @@ static const char *stateToString(int state);
|
|||
{
|
||||
config_warn("Tag '%s' at line %d of file %s has become obsolete.\n"
|
||||
"To avoid this warning please update your configuration "
|
||||
"file using \"doxygen -u\"\n", qPrintable(g_cmd),
|
||||
yylineno,qPrintable(g_yyFileName));
|
||||
"file using \"analyze -u\"\n", OPrintable(g_cmd),
|
||||
yylineno,OPrintable(g_yyFileName));
|
||||
InputObsolete *obsoleteOpt = dynamic_cast<InputObsolete*>(g_curOption);
|
||||
if (obsoleteOpt)
|
||||
{
|
||||
if (obsoleteOpt->orgKind()==Input::StrList)
|
||||
{
|
||||
*g_arg = QStringList();
|
||||
*g_arg = OStringList();
|
||||
BEGIN(GetStrList);
|
||||
}
|
||||
else
|
||||
|
|
@ -467,7 +467,7 @@ static const char *stateToString(int state);
|
|||
if (g_curOption==nullptr) // oops not known
|
||||
{
|
||||
config_warn("ignoring unsupported tag '%s' at line %d, file %s\n",
|
||||
yytext,yylineno,qPrintable(g_yyFileName));
|
||||
yytext,yylineno,OPrintable(g_yyFileName));
|
||||
BEGIN(SkipInvalid);
|
||||
}
|
||||
else // known tag
|
||||
|
|
@ -483,15 +483,15 @@ static const char *stateToString(int state);
|
|||
case Input::Int:
|
||||
case Input::Bool:
|
||||
config_warn("operator += not supported for '%s'. Ignoring line %d, file %s\n",
|
||||
qPrintable(g_cmd),yylineno,qPrintable(g_yyFileName));
|
||||
OPrintable(g_cmd),yylineno,OPrintable(g_yyFileName));
|
||||
BEGIN(SkipInvalid);
|
||||
break;
|
||||
case Input::Obsolete:
|
||||
{
|
||||
config_warn("Tag '%s' at line %d of file %s has become obsolete.\n"
|
||||
"To avoid this warning please update your configuration "
|
||||
"file using \"doxygen -u\"\n",
|
||||
qPrintable(g_cmd),yylineno,qPrintable(g_yyFileName));
|
||||
"file using \"analyze -u\"\n",
|
||||
OPrintable(g_cmd),yylineno,OPrintable(g_yyFileName));
|
||||
InputObsolete *obsoleteOpt = dynamic_cast<InputObsolete*>(g_curOption);
|
||||
if (obsoleteOpt && obsoleteOpt->orgKind()==Input::StrList)
|
||||
{
|
||||
|
|
@ -511,7 +511,7 @@ static const char *stateToString(int state);
|
|||
|
||||
/*-------------- INCLUDE* ---------------*/
|
||||
|
||||
<Start>"@INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); g_arg=&g_includePathList; *g_arg = QStringList(); g_str=QByteArray(); }
|
||||
<Start>"@INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); g_arg=&g_includePathList; *g_arg = OStringList(); g_str=QByteArray(); }
|
||||
/* include a config file */
|
||||
<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
|
||||
<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
|
||||
|
|
@ -539,7 +539,7 @@ static const char *stateToString(int state);
|
|||
}
|
||||
}
|
||||
|
||||
<Start>[a-z_A-Z0-9]+ { config_warn("ignoring unknown tag '%s' at line %d, file %s\n",yytext,yylineno,qPrintable(g_yyFileName)); }
|
||||
<Start>[a-z_A-Z0-9]+ { config_warn("ignoring unknown tag '%s' at line %d, file %s\n",yytext,yylineno,OPrintable(g_yyFileName)); }
|
||||
|
||||
/*-------------- GetString ---------------*/
|
||||
|
||||
|
|
@ -593,41 +593,41 @@ static const char *stateToString(int state);
|
|||
<*>\\[ \r\t]*\n { }
|
||||
<*>[ \r\t] { }
|
||||
<*>\n
|
||||
<*>. { config_warn("ignoring unknown character '%c' at line %d, file %s\n",yytext[0],yylineno,qPrintable(g_yyFileName)); }
|
||||
<*>. { config_warn("ignoring unknown character '%c' at line %d, file %s\n",yytext[0],yylineno,OPrintable(g_yyFileName)); }
|
||||
|
||||
%%
|
||||
|
||||
/*@ ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void substEnvVarsInString(QString &s)
|
||||
static void substEnvVarsInString(OString &s)
|
||||
{
|
||||
static QRegularExpression re(QString::fromLatin1("\\$\\([a-z_A-Z0-9]+\\)"));
|
||||
static QRegularExpression re(OString::fromLatin1("\\$\\([a-z_A-Z0-9]+\\)"));
|
||||
if (s.isEmpty()) return;
|
||||
int p=0;
|
||||
int i,l;
|
||||
//printf("substEnvVarInString(%s) start\n",qPrintable(s));
|
||||
//printf("substEnvVarInString(%s) start\n",OPrintable(s));
|
||||
|
||||
QRegularExpressionMatch match;
|
||||
while ((i=s.indexOf(re,p,&match))!=-1)
|
||||
{
|
||||
l = match.capturedLength();
|
||||
//printf("Found environment var s.mid(%d,%d)='%s'\n",i+2,l-3,qPrintable(s.mid(i+2,l-3)));
|
||||
QString env=g_codec->decode(getenv(s.mid(i+2,l-3).toLatin1()));
|
||||
//printf("Found environment var s.mid(%d,%d)='%s'\n",i+2,l-3,OPrintable(s.mid(i+2,l-3)));
|
||||
OString env=g_codec->decode(getenv(s.mid(i+2,l-3).toLatin1()));
|
||||
substEnvVarsInString(env); // recursively expand variables if needed.
|
||||
s = s.left(i)+env+s.right(s.length()-i-l);
|
||||
p=i+env.length(); // next time start at the end of the expanded string
|
||||
}
|
||||
s=s.trimmed(); // to strip the bogus space that was added when an argument
|
||||
// has quotes
|
||||
//printf("substEnvVarInString(%s) end\n",qPrintable(s));
|
||||
//printf("substEnvVarInString(%s) end\n",OPrintable(s));
|
||||
}
|
||||
|
||||
static void substEnvVarsInStrList(QStringList &sl)
|
||||
static void substEnvVarsInStrList(OStringList &sl)
|
||||
{
|
||||
QStringList out;
|
||||
OStringList out;
|
||||
|
||||
foreach (QString result, sl)
|
||||
foreach (OString result, sl)
|
||||
{
|
||||
// an argument with quotes will have an extra space at the end, so wasQuoted will be TRUE.
|
||||
bool wasQuoted = (result.indexOf(QChar::fromLatin1(' '))!=-1) ||
|
||||
|
|
@ -635,7 +635,7 @@ static void substEnvVarsInStrList(QStringList &sl)
|
|||
// here we strip the quote again
|
||||
substEnvVarsInString(result);
|
||||
|
||||
//printf("Result %s was quoted=%d\n",qPrintable(result),wasQuoted);
|
||||
//printf("Result %s was quoted=%d\n",OPrintable(result),wasQuoted);
|
||||
|
||||
if (!wasQuoted) /* as a result of the expansion, a single string
|
||||
may have expanded into a list, which we'll
|
||||
|
|
@ -699,11 +699,11 @@ static void substEnvVarsInStrList(QStringList &sl)
|
|||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
static void upgradeConfig(const QHash<QString,Input*> &options)
|
||||
static void upgradeConfig(const OHash<OString,Input*> &options)
|
||||
{
|
||||
auto it1 = options.find(QString::fromLatin1("CLASS_DIAGRAMS"));
|
||||
auto it2 = options.find(QString::fromLatin1("HAVE_DOT"));
|
||||
auto it3 = options.find(QString::fromLatin1("CLASS_GRAPH"));
|
||||
auto it1 = options.find(OString::fromLatin1("CLASS_DIAGRAMS"));
|
||||
auto it2 = options.find(OString::fromLatin1("HAVE_DOT"));
|
||||
auto it3 = options.find(OString::fromLatin1("CLASS_GRAPH"));
|
||||
if (it1!=options.end() && it2!=options.end() && it3!=options.end())
|
||||
{
|
||||
if ((*it1)->kind()==Input::Obsolete)
|
||||
|
|
@ -723,7 +723,7 @@ static void upgradeConfig(const QHash<QString,Input*> &options)
|
|||
if (isValid1 && isValid2 && isValid3 && !classDiagrams && !haveDot && classGraph)
|
||||
{
|
||||
config_warn("Changing CLASS_GRAPH option to TEXT because obsolete option CLASS_DIAGRAM was found and set to NO.\n");
|
||||
optClassGraph->setValue(QString::fromLatin1("TEXT"));
|
||||
optClassGraph->setValue(OString::fromLatin1("TEXT"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -733,13 +733,13 @@ static void upgradeConfig(const QHash<QString,Input*> &options)
|
|||
//--------------------------------------------------------------------------
|
||||
|
||||
bool parseConfig(
|
||||
const QString &fileName,
|
||||
const QHash<QString,Input *> &options
|
||||
const OString &fileName,
|
||||
const OHash<OString,Input *> &options
|
||||
)
|
||||
{
|
||||
yylineno = 1;
|
||||
config_open();
|
||||
QHashIterator<QString, Input*> i(options);
|
||||
OHashIterator<OString, Input*> i(options);
|
||||
g_file = fopen(fileName.toLocal8Bit(),"r");
|
||||
if (g_file==nullptr) return false;
|
||||
|
||||
|
|
@ -759,9 +759,9 @@ bool parseConfig(
|
|||
g_yyFileName = fileName;
|
||||
g_includeStack.clear();
|
||||
g_includeDepth = 0;
|
||||
config_doxywYYrestart( config_doxywYYin );
|
||||
config_analzwYYrestart( config_analzwYYin );
|
||||
BEGIN( Start );
|
||||
config_doxywYYlex();
|
||||
config_analzwYYlex();
|
||||
|
||||
upgradeConfig(options);
|
||||
|
||||
|
|
@ -772,12 +772,12 @@ bool parseConfig(
|
|||
i.next();
|
||||
if (i.value())
|
||||
{
|
||||
//printf("Updating: %s\n",qPrintable(i.key()));
|
||||
//printf("Updating: %s\n",OPrintable(i.key()));
|
||||
i.value()->update();
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Invalid option: %s\n",qPrintable(i.key()));
|
||||
printf("Invalid option: %s\n",OPrintable(i.key()));
|
||||
}
|
||||
}
|
||||
fclose(g_file);
|
||||
|
|
@ -785,7 +785,7 @@ bool parseConfig(
|
|||
return true;
|
||||
}
|
||||
|
||||
void writeStringValue(QTextStream &t,TextCodecAdapter *codec,const QString &s,bool convert)
|
||||
void writeStringValue(QGGextStream &t,TextCodecAdapter *codec,const OString &s,bool convert)
|
||||
{
|
||||
QChar c;
|
||||
bool needsEscaping=false;
|
||||
|
|
@ -863,5 +863,5 @@ void writeStringValue(QTextStream &t,TextCodecAdapter *codec,const QString &s,bo
|
|||
}
|
||||
}
|
||||
#if USE_STATE2STRING
|
||||
#include "config_doxyw.l.h"
|
||||
#include "config_analzw.l.h"
|
||||
#endif
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
#include <OString>
|
||||
#include "config_msg.h"
|
||||
#include "analzwizard.h"
|
||||
|
||||
static OString warning_str = OString::fromLatin1("warning: ");
|
||||
static OString error_str = OString::fromLatin1("error: ");
|
||||
|
||||
void config_err(const char *fmt, ...)
|
||||
{
|
||||
OString msg = error_str;
|
||||
|
||||
msg.append(OString::fromLatin1(fmt));
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char debugOut[1000]; // this size should be sufficient
|
||||
vsnprintf(debugOut, 1000,OPrintable(msg), args);
|
||||
MainWindow::instance().outputLogText(OString::fromLatin1(debugOut));
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void config_term(const char *fmt, ...)
|
||||
{
|
||||
OString msg = error_str;
|
||||
|
||||
msg.append(OString::fromLatin1(fmt));
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char debugOut[1000]; // this size should be sufficient
|
||||
vsnprintf(debugOut, 1000,OPrintable(msg), args);
|
||||
MainWindow::instance().outputLogText(OString::fromLatin1(debugOut));
|
||||
va_end(args);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void config_warn(const char *fmt, ...)
|
||||
{
|
||||
OString msg = warning_str;
|
||||
|
||||
msg.append(OString::fromLatin1(fmt));
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char debugOut[1000];
|
||||
vsnprintf(debugOut, 1000,OPrintable(msg), args);
|
||||
MainWindow::instance().outputLogText(OString::fromLatin1(debugOut));
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void config_open()
|
||||
{
|
||||
MainWindow::instance().outputLogStart();
|
||||
}
|
||||
|
||||
void config_finish()
|
||||
{
|
||||
MainWindow::instance().outputLogFinish();
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef DOXYW_MSG_H
|
||||
#define DOXYW_MSG_H
|
||||
#ifndef analzW_MSG_H
|
||||
#define analzW_MSG_H
|
||||
|
||||
void config_err(const char *fmt, ...);
|
||||
void config_term(const char *fmt, ...);
|
||||
|
|
@ -22,28 +22,28 @@
|
|||
#include "configdoc.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <QTreeWidget>
|
||||
#include <QStackedWidget>
|
||||
#include <QTextBrowser>
|
||||
#include <QSplitter>
|
||||
#include <QGGreeWidget>
|
||||
#include <OStackedWidget>
|
||||
#include <QGGextBrowser>
|
||||
#include <OSplitter>
|
||||
#include <QGridLayout>
|
||||
#include <QPushButton>
|
||||
#include <QScrollArea>
|
||||
#include <OPushButton>
|
||||
#include <OScrollArea>
|
||||
#include <QFile>
|
||||
#include <QMessageBox>
|
||||
#include <QSettings>
|
||||
#include <QTextStream>
|
||||
#include <OSettings>
|
||||
#include <QGGextStream>
|
||||
#include <QFileInfo>
|
||||
#include <QRegularExpression>
|
||||
|
||||
#define SA(x) QString::fromLatin1(x)
|
||||
#define SA(x) OString::fromLatin1(x)
|
||||
|
||||
|
||||
static QString convertToComment(const QString &s)
|
||||
static OString convertToComment(const OString &s)
|
||||
{
|
||||
if (s.isEmpty())
|
||||
{
|
||||
return QString();
|
||||
return OString();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -71,20 +71,20 @@ void Expert::add(const char *name,const char *docs)
|
|||
|
||||
Expert::Expert()
|
||||
{
|
||||
m_treeWidget = new QTreeWidget;
|
||||
m_treeWidget = new QGGreeWidget;
|
||||
m_treeWidget->setColumnCount(1);
|
||||
m_topicStack = new QStackedWidget;
|
||||
m_topicStack = new OStackedWidget;
|
||||
m_inShowHelp = false;
|
||||
|
||||
QFile file(SA(":/config.xml"));
|
||||
QString err;
|
||||
OString err;
|
||||
int errLine,errCol;
|
||||
QDomDocument configXml;
|
||||
if (file.open(QIODevice::ReadOnly))
|
||||
{
|
||||
if (!configXml.setContent(&file,false,&err,&errLine,&errCol))
|
||||
{
|
||||
QString msg = tr("Error parsing internal config.xml at line %1 column %2.\n%3").
|
||||
OString msg = tr("Error parsing internal config.xml at line %1 column %2.\n%3").
|
||||
arg(errLine).arg(errCol).arg(err);
|
||||
QMessageBox::warning(this, tr("Error"), msg);
|
||||
exit(1);
|
||||
|
|
@ -93,21 +93,21 @@ Expert::Expert()
|
|||
m_rootElement = configXml.documentElement();
|
||||
|
||||
createTopics(m_rootElement);
|
||||
m_helper = new QTextBrowser;
|
||||
m_helper = new QGGextBrowser;
|
||||
m_helper->setReadOnly(true);
|
||||
m_helper->setOpenExternalLinks(true);
|
||||
m_splitter = new QSplitter(Qt::Vertical);
|
||||
m_splitter = new OSplitter(QGG::Vertical);
|
||||
m_splitter->addWidget(m_treeWidget);
|
||||
m_splitter->addWidget(m_helper);
|
||||
|
||||
QWidget *rightSide = new QWidget;
|
||||
QGridLayout *grid = new QGridLayout(rightSide);
|
||||
m_prev = new QPushButton(tr("Previous"));
|
||||
m_prev = new OPushButton(tr("Previous"));
|
||||
m_prev->setEnabled(false);
|
||||
m_next = new QPushButton(tr("Next"));
|
||||
m_next = new OPushButton(tr("Next"));
|
||||
grid->addWidget(m_topicStack,0,0,1,2);
|
||||
grid->addWidget(m_prev,1,0,Qt::AlignLeft);
|
||||
grid->addWidget(m_next,1,1,Qt::AlignRight);
|
||||
grid->addWidget(m_prev,1,0,QGG::AlignLeft);
|
||||
grid->addWidget(m_next,1,1,QGG::AlignRight);
|
||||
grid->setColumnStretch(0,1);
|
||||
grid->setRowStretch(0,1);
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ Expert::Expert()
|
|||
|
||||
Expert::~Expert()
|
||||
{
|
||||
QHashIterator<QString,Input*> i(m_options);
|
||||
OHashIterator<OString,Input*> i(m_options);
|
||||
while (i.hasNext())
|
||||
{
|
||||
i.next();
|
||||
|
|
@ -132,18 +132,18 @@ Expert::~Expert()
|
|||
|
||||
void Expert::createTopics(const QDomElement &rootElem)
|
||||
{
|
||||
QList<QTreeWidgetItem*> items;
|
||||
QList<QGGreeWidgetItem*> items;
|
||||
QDomElement childElem = rootElem.firstChildElement();
|
||||
while (!childElem.isNull())
|
||||
{
|
||||
if (childElem.tagName()==SA("group"))
|
||||
{
|
||||
// Remove _ from a group name like: Source_Browser
|
||||
QString name = childElem.attribute(SA("name")).replace(SA("_"),SA(" "));
|
||||
QString setting = childElem.attribute(SA("setting"));
|
||||
OString name = childElem.attribute(SA("name")).replace(SA("_"),SA(" "));
|
||||
OString setting = childElem.attribute(SA("setting"));
|
||||
if (setting.isEmpty() || IS_SUPPORTED(setting.toLatin1()))
|
||||
{
|
||||
items.append(new QTreeWidgetItem((QTreeWidget*)nullptr,QStringList(name)));
|
||||
items.append(new QGGreeWidgetItem((QGGreeWidget*)nullptr,OStringList(name)));
|
||||
QWidget *widget = createTopicWidget(childElem);
|
||||
m_topics[name] = widget;
|
||||
m_topicStack->addWidget(widget);
|
||||
|
|
@ -151,24 +151,24 @@ void Expert::createTopics(const QDomElement &rootElem)
|
|||
}
|
||||
childElem = childElem.nextSiblingElement();
|
||||
}
|
||||
m_treeWidget->setHeaderLabels(QStringList() << SA("Topics"));
|
||||
m_treeWidget->setHeaderLabels(OStringList() << SA("Topics"));
|
||||
m_treeWidget->insertTopLevelItems(0,items);
|
||||
connect(m_treeWidget,
|
||||
SIGNAL(currentItemChanged(QTreeWidgetItem *,QTreeWidgetItem *)),
|
||||
SIGNAL(currentItemChanged(QGGreeWidgetItem *,QGGreeWidgetItem *)),
|
||||
this,
|
||||
SLOT(activateTopic(QTreeWidgetItem *,QTreeWidgetItem *)));
|
||||
SLOT(activateTopic(QGGreeWidgetItem *,QGGreeWidgetItem *)));
|
||||
}
|
||||
|
||||
static QString getDocsForNode(const QDomElement &child)
|
||||
static OString getDocsForNode(const QDomElement &child)
|
||||
{
|
||||
QString type = child.attribute(SA("type"));
|
||||
QString docs = SA("");
|
||||
OString type = child.attribute(SA("type"));
|
||||
OString docs = SA("");
|
||||
// read documentation text
|
||||
QDomElement docsVal = child.firstChildElement();
|
||||
while (!docsVal.isNull())
|
||||
{
|
||||
if (docsVal.tagName()==SA("docs") &&
|
||||
docsVal.attribute(SA("doxywizard")) != SA("0"))
|
||||
docsVal.attribute(SA("analzwizard")) != SA("0"))
|
||||
{
|
||||
for (QDomNode n = docsVal.firstChild(); !n.isNull(); n = n.nextSibling())
|
||||
{
|
||||
|
|
@ -203,7 +203,7 @@ static QString getDocsForNode(const QDomElement &child)
|
|||
{
|
||||
i++;
|
||||
docs += SA("<code>") + docsVal.attribute(SA("name")) + SA("</code>");
|
||||
QString desc = docsVal.attribute(SA("desc"));
|
||||
OString desc = docsVal.attribute(SA("desc"));
|
||||
if (!desc.isEmpty())
|
||||
{
|
||||
docs+= SA(" ")+desc;
|
||||
|
|
@ -250,7 +250,7 @@ static QString getDocsForNode(const QDomElement &child)
|
|||
}
|
||||
else
|
||||
{
|
||||
QString defval = child.attribute(SA("defval"));
|
||||
OString defval = child.attribute(SA("defval"));
|
||||
docs+=SA(" The default value is: <code>")+
|
||||
(defval==SA("1")?SA("YES"):SA("NO"))+
|
||||
SA("</code>.");
|
||||
|
|
@ -267,7 +267,7 @@ static QString getDocsForNode(const QDomElement &child)
|
|||
{
|
||||
if (docsVal.tagName()==SA("value"))
|
||||
{
|
||||
QString showDocu = SA("");
|
||||
OString showDocu = SA("");
|
||||
if (docsVal.hasAttribute(SA("show_docu")))
|
||||
{
|
||||
showDocu = docsVal.attribute(SA("show_docu")).toLower();
|
||||
|
|
@ -284,7 +284,7 @@ static QString getDocsForNode(const QDomElement &child)
|
|||
{
|
||||
if (docsVal.tagName()==SA("value"))
|
||||
{
|
||||
QString showDocu = SA("");
|
||||
OString showDocu = SA("");
|
||||
if (docsVal.hasAttribute(SA("show_docu")))
|
||||
{
|
||||
showDocu = docsVal.attribute(SA("show_docu")).toLower();
|
||||
|
|
@ -293,7 +293,7 @@ static QString getDocsForNode(const QDomElement &child)
|
|||
{
|
||||
i++;
|
||||
docs += SA("<code>") + docsVal.attribute(SA("name")) + SA("</code>");
|
||||
QString desc = docsVal.attribute(SA("desc"));
|
||||
OString desc = docsVal.attribute(SA("desc"));
|
||||
if (desc != SA(""))
|
||||
{
|
||||
docs += SA(" ") + desc;
|
||||
|
|
@ -320,7 +320,7 @@ static QString getDocsForNode(const QDomElement &child)
|
|||
}
|
||||
else if (type==SA("string"))
|
||||
{
|
||||
QString defval = child.attribute(SA("defval"));
|
||||
OString defval = child.attribute(SA("defval"));
|
||||
if (child.attribute(SA("format")) == SA("dir"))
|
||||
{
|
||||
if (defval != SA(""))
|
||||
|
|
@ -332,7 +332,7 @@ static QString getDocsForNode(const QDomElement &child)
|
|||
}
|
||||
else if (child.attribute(SA("format")) == SA("file"))
|
||||
{
|
||||
QString abspath = child.attribute(SA("abspath"));
|
||||
OString abspath = child.attribute(SA("abspath"));
|
||||
if (defval != SA(""))
|
||||
{
|
||||
docs+=SA("<br/>");
|
||||
|
|
@ -358,7 +358,7 @@ static QString getDocsForNode(const QDomElement &child)
|
|||
}
|
||||
else if (child.attribute(SA("format")) == SA("image"))
|
||||
{
|
||||
QString abspath = child.attribute(SA("abspath"));
|
||||
OString abspath = child.attribute(SA("abspath"));
|
||||
if (defval != SA(""))
|
||||
{
|
||||
docs+=SA("<br/>");
|
||||
|
|
@ -395,7 +395,7 @@ static QString getDocsForNode(const QDomElement &child)
|
|||
|
||||
if (child.hasAttribute(SA("depends")))
|
||||
{
|
||||
QString dependsOn = child.attribute(SA("depends"));
|
||||
OString dependsOn = child.attribute(SA("depends"));
|
||||
docs+=SA("<br/>");
|
||||
docs+= SA(" This tag requires that the tag \\ref cfg_");
|
||||
docs+= dependsOn.toLower();
|
||||
|
|
@ -404,9 +404,9 @@ static QString getDocsForNode(const QDomElement &child)
|
|||
docs+= SA("\" is set to <code>YES</code>.");
|
||||
}
|
||||
|
||||
// Remove / replace doxygen markup strings
|
||||
// Remove / replace analyze markup strings
|
||||
// the regular expressions are hard to read so the intention will be given
|
||||
// Note: see also configgen.py in the src directory for other doxygen parts
|
||||
// Note: see also configgen.py in the src directory for other analyze parts
|
||||
QRegularExpression regexp;
|
||||
// remove \n at end and replace by a space
|
||||
regexp.setPattern(SA("\\n$"));
|
||||
|
|
@ -435,8 +435,8 @@ static QString getDocsForNode(const QDomElement &child)
|
|||
docs.replace(regexp,SA("<code>\\1</code> "));
|
||||
//\ref specials
|
||||
// \ref <key> -> description
|
||||
regexp.setPattern(SA("\\\\ref[ ]+doxygen_usage"));
|
||||
docs.replace(regexp,SA("\"Doxygen usage\""));
|
||||
regexp.setPattern(SA("\\\\ref[ ]+analyze_usage"));
|
||||
docs.replace(regexp,SA("\"analyze usage\""));
|
||||
regexp.setPattern(SA("\\\\ref[ ]+extsearch"));
|
||||
docs.replace(regexp,SA("\"External Indexing and Searching\""));
|
||||
regexp.setPattern(SA("\\\\ref[ ]+external"));
|
||||
|
|
@ -501,18 +501,18 @@ static QString getDocsForNode(const QDomElement &child)
|
|||
|
||||
QWidget *Expert::createTopicWidget(QDomElement &elem)
|
||||
{
|
||||
QScrollArea *area = new QScrollArea;
|
||||
OScrollArea *area = new OScrollArea;
|
||||
QWidget *topic = new QWidget;
|
||||
QGridLayout *layout = new QGridLayout(topic);
|
||||
QDomElement child = elem.firstChildElement();
|
||||
int row=0;
|
||||
while (!child.isNull())
|
||||
{
|
||||
QString setting = child.attribute(SA("setting"));
|
||||
OString setting = child.attribute(SA("setting"));
|
||||
if (setting.isEmpty() || IS_SUPPORTED(setting.toLatin1()))
|
||||
{
|
||||
QString type = child.attribute(SA("type"));
|
||||
QString docs = getDocsForNode(child);
|
||||
OString type = child.attribute(SA("type"));
|
||||
OString docs = getDocsForNode(child);
|
||||
if (type==SA("bool"))
|
||||
{
|
||||
InputBool *boolOption =
|
||||
|
|
@ -532,7 +532,7 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
|
|||
else if (type==SA("string"))
|
||||
{
|
||||
InputString::StringMode mode;
|
||||
QString format = child.attribute(SA("format"));
|
||||
OString format = child.attribute(SA("format"));
|
||||
if (format==SA("dir"))
|
||||
{
|
||||
mode = InputString::StringDir;
|
||||
|
|
@ -614,7 +614,7 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
|
|||
else if (type==SA("list"))
|
||||
{
|
||||
InputStrList::ListMode mode;
|
||||
QString format = child.attribute(SA("format"));
|
||||
OString format = child.attribute(SA("format"));
|
||||
if (format==SA("dir"))
|
||||
{
|
||||
mode = InputStrList::ListDir;
|
||||
|
|
@ -631,7 +631,7 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
|
|||
{
|
||||
mode = InputStrList::ListString;
|
||||
}
|
||||
QStringList sl;
|
||||
OStringList sl;
|
||||
QDomElement listVal = child.firstChildElement();
|
||||
while (!listVal.isNull())
|
||||
{
|
||||
|
|
@ -659,7 +659,7 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
|
|||
else if (type==SA("obsolete"))
|
||||
{
|
||||
Input::Kind orgKind;
|
||||
QString orgKindStr = child.attribute(SA("orgtype"));
|
||||
OString orgKindStr = child.attribute(SA("orgtype"));
|
||||
if (orgKindStr==SA("int"))
|
||||
{
|
||||
orgKind = Input::Int;
|
||||
|
|
@ -687,7 +687,7 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
|
|||
}
|
||||
else // should not happen
|
||||
{
|
||||
printf("Unsupported type %s\n",qPrintable(child.attribute(SA("type"))));
|
||||
printf("Unsupported type %s\n",OPrintable(child.attribute(SA("type"))));
|
||||
}
|
||||
} // IS_SUPPORTED
|
||||
child = child.nextSiblingElement();
|
||||
|
|
@ -697,9 +697,9 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
|
|||
child = elem.firstChildElement();
|
||||
while (!child.isNull())
|
||||
{
|
||||
QString setting = child.attribute(SA("setting"));
|
||||
QString dependsOn = child.attribute(SA("depends"));
|
||||
QString id = child.attribute(SA("id"));
|
||||
OString setting = child.attribute(SA("setting"));
|
||||
OString dependsOn = child.attribute(SA("depends"));
|
||||
OString id = child.attribute(SA("id"));
|
||||
if (!dependsOn.isEmpty() &&
|
||||
(setting.isEmpty() || IS_SUPPORTED(setting.toLatin1())))
|
||||
{
|
||||
|
|
@ -707,7 +707,7 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
|
|||
if (parentOption==nullptr)
|
||||
{
|
||||
printf("%s has depends=%s that is not valid\n",
|
||||
qPrintable(id),qPrintable(dependsOn));
|
||||
OPrintable(id),OPrintable(dependsOn));
|
||||
}
|
||||
Input *thisOption = m_options[id];
|
||||
Q_ASSERT(parentOption);
|
||||
|
|
@ -715,8 +715,8 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
|
|||
if (parentOption && thisOption)
|
||||
{
|
||||
//printf("Adding dependency '%s' (%p)->'%s' (%p)\n",
|
||||
// qPrintable(dependsOn),parentOption,
|
||||
// qPrintable(id),thisOption);
|
||||
// OPrintable(dependsOn),parentOption,
|
||||
// OPrintable(id),thisOption);
|
||||
parentOption->addDependency(thisOption);
|
||||
}
|
||||
}
|
||||
|
|
@ -724,7 +724,7 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
|
|||
}
|
||||
|
||||
// set initial dependencies
|
||||
QHashIterator<QString,Input*> i(m_options);
|
||||
OHashIterator<OString,Input*> i(m_options);
|
||||
while (i.hasNext())
|
||||
{
|
||||
i.next();
|
||||
|
|
@ -743,7 +743,7 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
|
|||
return area;
|
||||
}
|
||||
|
||||
void Expert::activateTopic(QTreeWidgetItem *item,QTreeWidgetItem *)
|
||||
void Expert::activateTopic(QGGreeWidgetItem *item,QGGreeWidgetItem *)
|
||||
{
|
||||
if (item)
|
||||
{
|
||||
|
|
@ -754,29 +754,29 @@ void Expert::activateTopic(QTreeWidgetItem *item,QTreeWidgetItem *)
|
|||
}
|
||||
}
|
||||
|
||||
void Expert::loadSettings(QSettings *s)
|
||||
void Expert::loadSettings(OSettings *s)
|
||||
{
|
||||
QHashIterator<QString,Input*> i(m_options);
|
||||
OHashIterator<OString,Input*> i(m_options);
|
||||
while (i.hasNext())
|
||||
{
|
||||
i.next();
|
||||
QVariant var = s->value(SA("config/")+i.key());
|
||||
if (i.value() && var.isValid())
|
||||
{
|
||||
//printf("Loading key %s: type=%d value='%s'\n",qPrintable(i.key()),var.type(),qPrintable(var.toString()));
|
||||
//printf("Loading key %s: type=%d value='%s'\n",OPrintable(i.key()),var.type(),OPrintable(var.toString()));
|
||||
i.value()->value() = var;
|
||||
i.value()->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Expert::saveSettings(QSettings *s)
|
||||
void Expert::saveSettings(OSettings *s)
|
||||
{
|
||||
QHashIterator<QString,Input*> i(m_options);
|
||||
OHashIterator<OString,Input*> i(m_options);
|
||||
while (i.hasNext())
|
||||
{
|
||||
i.next();
|
||||
//printf("Saving key %s: type=%d value='%s'\n",qPrintable(i.key()),i.value()->value().type(),qPrintable(i.value()->value().toString()));
|
||||
//printf("Saving key %s: type=%d value='%s'\n",OPrintable(i.key()),i.value()->value().type(),OPrintable(i.value()->value().toString()));
|
||||
if (i.value())
|
||||
{
|
||||
s->setValue(SA("config/")+i.key(),i.value()->value());
|
||||
|
|
@ -784,13 +784,13 @@ void Expert::saveSettings(QSettings *s)
|
|||
}
|
||||
}
|
||||
|
||||
void Expert::loadConfig(const QString &fileName)
|
||||
void Expert::loadConfig(const OString &fileName)
|
||||
{
|
||||
//printf("Expert::loadConfig(%s)\n",qPrintable(fileName));
|
||||
//printf("Expert::loadConfig(%s)\n",OPrintable(fileName));
|
||||
parseConfig(fileName,m_options);
|
||||
}
|
||||
|
||||
void Expert::saveTopic(QTextStream &t,QDomElement &elem,TextCodecAdapter *codec,
|
||||
void Expert::saveTopic(QGGextStream &t,QDomElement &elem,TextCodecAdapter *codec,
|
||||
bool brief,bool condensed,bool convert)
|
||||
{
|
||||
if (!brief)
|
||||
|
|
@ -807,12 +807,12 @@ void Expert::saveTopic(QTextStream &t,QDomElement &elem,TextCodecAdapter *codec,
|
|||
QDomElement childElem = elem.firstChildElement();
|
||||
while (!childElem.isNull())
|
||||
{
|
||||
QString setting = childElem.attribute(SA("setting"));
|
||||
QString type = childElem.attribute(SA("type"));
|
||||
QString name = childElem.attribute(SA("id"));
|
||||
OString setting = childElem.attribute(SA("setting"));
|
||||
OString type = childElem.attribute(SA("type"));
|
||||
OString name = childElem.attribute(SA("id"));
|
||||
if (setting.isEmpty() || IS_SUPPORTED(setting.toLatin1()))
|
||||
{
|
||||
QHash<QString,Input*>::const_iterator i = m_options.find(name);
|
||||
OHash<OString,Input*>::const_iterator i = m_options.find(name);
|
||||
if (i!=m_options.end())
|
||||
{
|
||||
Input *option = i.value();
|
||||
|
|
@ -843,16 +843,16 @@ void Expert::saveTopic(QTextStream &t,QDomElement &elem,TextCodecAdapter *codec,
|
|||
}
|
||||
}
|
||||
|
||||
bool Expert::writeConfig(QTextStream &t,bool brief, bool condensed, bool convert)
|
||||
bool Expert::writeConfig(QGGextStream &t,bool brief, bool condensed, bool convert)
|
||||
{
|
||||
// write global header
|
||||
t << "# Doxyfile " << getDoxygenVersion().c_str() << "\n\n";
|
||||
t << "# analzfile " << getanalyzeVersion().c_str() << "\n\n";
|
||||
if (!brief && !condensed)
|
||||
{
|
||||
t << convertToComment(m_header);
|
||||
}
|
||||
|
||||
Input *option = m_options[QString::fromLatin1("DOXYFILE_ENCODING")];
|
||||
Input *option = m_options[OString::fromLatin1("analzFILE_ENCODING")];
|
||||
TextCodecAdapter codec(option->value().toString().toLatin1());
|
||||
QDomElement childElem = m_rootElement.firstChildElement();
|
||||
while (!childElem.isNull())
|
||||
|
|
@ -882,12 +882,12 @@ void Expert::showHelp(Input *option)
|
|||
{
|
||||
m_inShowHelp = true;
|
||||
m_helper->setText(
|
||||
QString::fromLatin1("<qt><b>")+option->id()+
|
||||
QString::fromLatin1("</b><br>")+
|
||||
QString::fromLatin1("<br/>")+
|
||||
OString::fromLatin1("<QGG><b>")+option->id()+
|
||||
OString::fromLatin1("</b><br>")+
|
||||
OString::fromLatin1("<br/>")+
|
||||
option->docs().
|
||||
replace(QChar::fromLatin1('\n'),QChar::fromLatin1(' '))+
|
||||
QString::fromLatin1("</qt>")
|
||||
OString::fromLatin1("</QGG>")
|
||||
);
|
||||
m_inShowHelp = false;
|
||||
}
|
||||
|
|
@ -919,7 +919,7 @@ void Expert::prevTopic()
|
|||
void Expert::resetToDefaults()
|
||||
{
|
||||
//printf("Expert::makeDefaults()\n");
|
||||
QHashIterator<QString,Input*> i(m_options);
|
||||
OHashIterator<OString,Input*> i(m_options);
|
||||
while (i.hasNext())
|
||||
{
|
||||
i.next();
|
||||
|
|
@ -932,20 +932,20 @@ void Expert::resetToDefaults()
|
|||
|
||||
static bool stringVariantToBool(const QVariant &v)
|
||||
{
|
||||
QString s = v.toString().toLower();
|
||||
return s==QString::fromLatin1("yes") || s==QString::fromLatin1("true") || s==QString::fromLatin1("1");
|
||||
OString s = v.toString().toLower();
|
||||
return s==OString::fromLatin1("yes") || s==OString::fromLatin1("true") || s==OString::fromLatin1("1");
|
||||
}
|
||||
|
||||
static bool getBoolOption(
|
||||
const QHash<QString,Input*>&model,const QString &name)
|
||||
const OHash<OString,Input*>&model,const OString &name)
|
||||
{
|
||||
Input *option = model[name];
|
||||
Q_ASSERT(option!=nullptr);
|
||||
return stringVariantToBool(option->value());
|
||||
}
|
||||
|
||||
static QString getStringOption(
|
||||
const QHash<QString,Input*>&model,const QString &name)
|
||||
static OString getStringOption(
|
||||
const OHash<OString,Input*>&model,const OString &name)
|
||||
{
|
||||
Input *option = model[name];
|
||||
Q_ASSERT(option!=nullptr);
|
||||
|
|
@ -953,29 +953,29 @@ static QString getStringOption(
|
|||
}
|
||||
|
||||
|
||||
bool Expert::htmlOutputPresent(const QString &workingDir) const
|
||||
bool Expert::htmlOutputPresent(const OString &workingDir) const
|
||||
{
|
||||
bool generateHtml = getBoolOption(m_options,QString::fromLatin1("GENERATE_HTML"));
|
||||
bool generateHtml = getBoolOption(m_options,OString::fromLatin1("GENERATE_HTML"));
|
||||
if (!generateHtml || workingDir.isEmpty()) return false;
|
||||
QString indexFile = getHtmlOutputIndex(workingDir);
|
||||
OString indexFile = getHtmlOutputIndex(workingDir);
|
||||
QFileInfo fi(indexFile);
|
||||
return fi.exists() && fi.isFile();
|
||||
}
|
||||
|
||||
QString Expert::getHtmlOutputIndex(const QString &workingDir) const
|
||||
OString Expert::getHtmlOutputIndex(const OString &workingDir) const
|
||||
{
|
||||
QString outputDir = getStringOption(m_options,QString::fromLatin1("OUTPUT_DIRECTORY"));
|
||||
QString htmlOutputDir = getStringOption(m_options,QString::fromLatin1("HTML_OUTPUT"));
|
||||
//printf("outputDir=%s\n",qPrintable(outputDir));
|
||||
//printf("htmlOutputDir=%s\n",qPrintable(htmlOutputDir));
|
||||
QString indexFile = workingDir;
|
||||
OString outputDir = getStringOption(m_options,OString::fromLatin1("OUTPUT_DIRECTORY"));
|
||||
OString htmlOutputDir = getStringOption(m_options,OString::fromLatin1("HTML_OUTPUT"));
|
||||
//printf("outputDir=%s\n",OPrintable(outputDir));
|
||||
//printf("htmlOutputDir=%s\n",OPrintable(htmlOutputDir));
|
||||
OString indexFile = workingDir;
|
||||
if (QFileInfo(outputDir).isAbsolute()) // override
|
||||
{
|
||||
indexFile = outputDir;
|
||||
}
|
||||
else // append
|
||||
{
|
||||
indexFile += QString::fromLatin1("/")+outputDir;
|
||||
indexFile += OString::fromLatin1("/")+outputDir;
|
||||
}
|
||||
if (QFileInfo(htmlOutputDir).isAbsolute()) // override
|
||||
{
|
||||
|
|
@ -983,27 +983,27 @@ QString Expert::getHtmlOutputIndex(const QString &workingDir) const
|
|||
}
|
||||
else // append
|
||||
{
|
||||
indexFile += QString::fromLatin1("/")+htmlOutputDir;
|
||||
indexFile += OString::fromLatin1("/")+htmlOutputDir;
|
||||
}
|
||||
indexFile+=QString::fromLatin1("/index.html");
|
||||
indexFile+=OString::fromLatin1("/index.html");
|
||||
return indexFile;
|
||||
}
|
||||
|
||||
bool Expert::pdfOutputPresent(const QString &workingDir) const
|
||||
bool Expert::pdfOutputPresent(const OString &workingDir) const
|
||||
{
|
||||
bool generateLatex = getBoolOption(m_options,QString::fromLatin1("GENERATE_LATEX"));
|
||||
bool pdfLatex = getBoolOption(m_options,QString::fromLatin1("USE_PDFLATEX"));
|
||||
bool generateLatex = getBoolOption(m_options,OString::fromLatin1("GENERATE_LATEX"));
|
||||
bool pdfLatex = getBoolOption(m_options,OString::fromLatin1("USE_PDFLATEX"));
|
||||
if (!generateLatex || !pdfLatex) return false;
|
||||
QString latexOutput = getStringOption(m_options,QString::fromLatin1("LATEX_OUTPUT"));
|
||||
QString indexFile;
|
||||
OString latexOutput = getStringOption(m_options,OString::fromLatin1("LATEX_OUTPUT"));
|
||||
OString indexFile;
|
||||
if (QFileInfo(latexOutput).isAbsolute())
|
||||
{
|
||||
indexFile = latexOutput+QString::fromLatin1("/refman.pdf");
|
||||
indexFile = latexOutput+OString::fromLatin1("/refman.pdf");
|
||||
}
|
||||
else
|
||||
{
|
||||
indexFile = workingDir+QString::fromLatin1("/")+
|
||||
latexOutput+QString::fromLatin1("/refman.pdf");
|
||||
indexFile = workingDir+OString::fromLatin1("/")+
|
||||
latexOutput+OString::fromLatin1("/refman.pdf");
|
||||
}
|
||||
QFileInfo fi(indexFile);
|
||||
return fi.exists() && fi.isFile();
|
||||
|
|
@ -13,46 +13,46 @@
|
|||
#ifndef EXPERT_H
|
||||
#define EXPERT_H
|
||||
|
||||
#include <QSplitter>
|
||||
#include <OSplitter>
|
||||
#include <QDomElement>
|
||||
#include <QHash>
|
||||
#include <OHash>
|
||||
|
||||
#include "docintf.h"
|
||||
#include "adapter.h"
|
||||
|
||||
class QTreeWidget;
|
||||
class QTreeWidgetItem;
|
||||
class QStackedWidget;
|
||||
class QSettings;
|
||||
class QTextBrowser;
|
||||
class QPushButton;
|
||||
class OGGreeWidget;
|
||||
class OGGreeWidgetItem;
|
||||
class OStackedWidget;
|
||||
class OSettings;
|
||||
class OGGextBrowser;
|
||||
class OPushButton;
|
||||
class Input;
|
||||
|
||||
class Expert : public QSplitter, public DocIntf
|
||||
class Expert : public OSplitter, public DocIntf
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Expert();
|
||||
~Expert();
|
||||
void loadSettings(QSettings *);
|
||||
void saveSettings(QSettings *);
|
||||
void loadConfig(const QString &fileName);
|
||||
bool writeConfig(QTextStream &t,bool brief,bool condensed, bool convert);
|
||||
void loadSettings(OSettings *);
|
||||
void saveSettings(OSettings *);
|
||||
void loadConfig(const OString &fileName);
|
||||
bool writeConfig(OGGextStream &t,bool brief,bool condensed, bool convert);
|
||||
QByteArray saveInnerState () const;
|
||||
bool restoreInnerState ( const QByteArray & state );
|
||||
const QHash<QString,Input*> &modelData() const { return m_options; }
|
||||
const OHash<OString,Input*> &modelData() const { return m_options; }
|
||||
void resetToDefaults();
|
||||
bool htmlOutputPresent(const QString &workingDir) const;
|
||||
bool pdfOutputPresent(const QString &workingDir) const;
|
||||
QString getHtmlOutputIndex(const QString &workingDir) const;
|
||||
bool htmlOutputPresent(const OString &workingDir) const;
|
||||
bool pdfOutputPresent(const OString &workingDir) const;
|
||||
OString getHtmlOutputIndex(const OString &workingDir) const;
|
||||
|
||||
// DocIntf methods
|
||||
void setHeader(const char *name);
|
||||
void add(const char *name,const char *doc);
|
||||
|
||||
public slots:
|
||||
void activateTopic(QTreeWidgetItem *,QTreeWidgetItem *);
|
||||
void activateTopic(OGGreeWidgetItem *,OGGreeWidgetItem *);
|
||||
QWidget *createTopicWidget(QDomElement &elem);
|
||||
void refresh();
|
||||
|
||||
|
|
@ -67,20 +67,20 @@ class Expert : public QSplitter, public DocIntf
|
|||
|
||||
private:
|
||||
void createTopics(const QDomElement &);
|
||||
void saveTopic(QTextStream &t,QDomElement &elem,TextCodecAdapter *codec,bool brief,bool dondensed,bool convert);
|
||||
void saveTopic(OGGextStream &t,QDomElement &elem,TextCodecAdapter *codec,bool brief,bool dondensed,bool convert);
|
||||
|
||||
QSplitter *m_splitter;
|
||||
QTextBrowser *m_helper;
|
||||
QTreeWidget *m_treeWidget;
|
||||
QStackedWidget *m_topicStack;
|
||||
QHash<QString,QWidget *> m_topics;
|
||||
QHash<QString,QObject *> m_optionWidgets;
|
||||
QHash<QString,Input *> m_options;
|
||||
QPushButton *m_next;
|
||||
QPushButton *m_prev;
|
||||
OSplitter *m_splitter;
|
||||
OGGextBrowser *m_helper;
|
||||
OGGreeWidget *m_treeWidget;
|
||||
OStackedWidget *m_topicStack;
|
||||
OHash<OString,QWidget *> m_topics;
|
||||
OHash<OString,QObject *> m_optionWidgets;
|
||||
OHash<OString,Input *> m_options;
|
||||
OPushButton *m_next;
|
||||
OPushButton *m_prev;
|
||||
QDomElement m_rootElement;
|
||||
bool m_inShowHelp;
|
||||
QString m_header;
|
||||
OString m_header;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -20,16 +20,16 @@ class HelpLabel : public QLabel
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
HelpLabel(const QString &text) : QLabel(text)
|
||||
{ setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(this,SIGNAL(customContextMenuRequested(const QPoint&)),
|
||||
this,SLOT(showMenu(const QPoint&)));
|
||||
HelpLabel(const OString &text) : QLabel(text)
|
||||
{ setContextMenuPolicy(QGG::CustomContextMenu);
|
||||
connect(this,SIGNAL(customContextMenuRequested(const OPoint&)),
|
||||
this,SLOT(showMenu(const OPoint&)));
|
||||
}
|
||||
signals:
|
||||
void enter();
|
||||
void reset();
|
||||
private slots:
|
||||
void showMenu(const QPoint &p)
|
||||
void showMenu(const OPoint &p)
|
||||
{
|
||||
QMenu menu(this);
|
||||
QAction *a = menu.addAction(tr("Reset to default"));
|
||||
|
|
@ -40,7 +40,7 @@ class HelpLabel : public QLabel
|
|||
}
|
||||
protected:
|
||||
void enterEvent(
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#if QGG_VERSION < QGG_VERSION_CHECK(6, 0, 0)
|
||||
QEvent * event
|
||||
#else
|
||||
QEnterEvent * event
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
|
|
@ -16,8 +16,8 @@
|
|||
#include <QVariant>
|
||||
#include "adapter.h"
|
||||
|
||||
class QTextStream;
|
||||
class QTextStream;
|
||||
class QGGextStream;
|
||||
class QGGextStream;
|
||||
|
||||
class Input
|
||||
{
|
||||
|
|
@ -34,16 +34,16 @@ class Input
|
|||
virtual QVariant &value() = 0;
|
||||
virtual void update() = 0;
|
||||
virtual Kind kind() const = 0;
|
||||
virtual QString docs() const = 0;
|
||||
virtual QString id() const = 0;
|
||||
virtual QString templateDocs() const = 0;
|
||||
virtual OString docs() const = 0;
|
||||
virtual OString id() const = 0;
|
||||
virtual OString templateDocs() const = 0;
|
||||
virtual void addDependency(Input *option) = 0;
|
||||
virtual void setEnabled(bool) = 0;
|
||||
virtual void updateDependencies() = 0;
|
||||
virtual void reset() = 0;
|
||||
virtual bool isDefault() = 0;
|
||||
virtual void writeValue(QTextStream &t,TextCodecAdapter *codec,bool convert) = 0;
|
||||
virtual void setTemplateDocs(const QString &docs) = 0;
|
||||
virtual void writeValue(QGGextStream &t,TextCodecAdapter *codec,bool convert) = 0;
|
||||
virtual void setTemplateDocs(const OString &docs) = 0;
|
||||
virtual bool isEmpty() { return false; };
|
||||
};
|
||||
|
||||
|
|
@ -15,12 +15,12 @@
|
|||
#include "config_msg.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QTextStream>
|
||||
#include <QGGextStream>
|
||||
#include <QGridLayout>
|
||||
|
||||
InputBool::InputBool( QGridLayout *layout, int &row,
|
||||
const QString &id, bool checked,
|
||||
const QString &docs )
|
||||
const OString &id, bool checked,
|
||||
const OString &docs )
|
||||
: m_default(checked), m_docs(docs), m_id(id)
|
||||
{
|
||||
m_lab = new HelpLabel(id);
|
||||
|
|
@ -75,11 +75,11 @@ void InputBool::updateDefault()
|
|||
{
|
||||
if (m_state==m_default || !m_lab->isEnabled())
|
||||
{
|
||||
m_lab->setText(QString::fromLatin1("<qt>")+m_id+QString::fromLatin1("</qt>"));
|
||||
m_lab->setText(OString::fromLatin1("<QGG>")+m_id+OString::fromLatin1("</QGG>"));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_lab->setText(QString::fromLatin1("<qt><font color='red'>")+m_id+QString::fromLatin1("</font></qt>"));
|
||||
m_lab->setText(OString::fromLatin1("<QGG><font color='red'>")+m_id+OString::fromLatin1("</font></QGG>"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -90,15 +90,15 @@ QVariant &InputBool::value()
|
|||
|
||||
bool InputBool::convertToBool(const QVariant &value,bool &isValid)
|
||||
{
|
||||
QString v = value.toString().toLower();
|
||||
if (v==QString::fromLatin1("yes") || v==QString::fromLatin1("true") ||
|
||||
v==QString::fromLatin1("1") || v==QString::fromLatin1("all"))
|
||||
OString v = value.toString().toLower();
|
||||
if (v==OString::fromLatin1("yes") || v==OString::fromLatin1("true") ||
|
||||
v==OString::fromLatin1("1") || v==OString::fromLatin1("all"))
|
||||
{
|
||||
isValid = true;
|
||||
return true;
|
||||
}
|
||||
else if (v==QString::fromLatin1("no") || v==QString::fromLatin1("false") ||
|
||||
v==QString::fromLatin1("0") || v==QString::fromLatin1("none"))
|
||||
else if (v==OString::fromLatin1("no") || v==OString::fromLatin1("false") ||
|
||||
v==OString::fromLatin1("0") || v==OString::fromLatin1("none"))
|
||||
{
|
||||
isValid = true;
|
||||
return false;
|
||||
|
|
@ -121,7 +121,7 @@ void InputBool::update()
|
|||
else
|
||||
{
|
||||
config_warn("argument '%s' for option %s is not a valid boolean value."
|
||||
" Using the default: %s!",qPrintable(m_value.toString()),qPrintable(m_id),m_default?"YES":"NO");
|
||||
" Using the default: %s!",OPrintable(m_value.toString()),OPrintable(m_id),m_default?"YES":"NO");
|
||||
m_state = m_default;
|
||||
}
|
||||
m_cb->setChecked( m_state );
|
||||
|
|
@ -134,12 +134,12 @@ void InputBool::reset()
|
|||
setValue(m_default);
|
||||
}
|
||||
|
||||
void InputBool::writeValue(QTextStream &t,TextCodecAdapter *codec,bool)
|
||||
void InputBool::writeValue(QGGextStream &t,TextCodecAdapter *codec,bool)
|
||||
{
|
||||
if (m_state)
|
||||
t << codec->encode(QString::fromLatin1("YES"));
|
||||
t << codec->encode(OString::fromLatin1("YES"));
|
||||
else
|
||||
t << codec->encode(QString::fromLatin1("NO"));
|
||||
t << codec->encode(OString::fromLatin1("NO"));
|
||||
}
|
||||
|
||||
bool InputBool::isDefault()
|
||||
|
|
@ -25,22 +25,22 @@ class InputBool : public QObject, public Input
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InputBool(QGridLayout *layout,int &row,const QString &id,
|
||||
bool enabled, const QString &docs );
|
||||
InputBool(QGridLayout *layout,int &row,const OString &id,
|
||||
bool enabled, const OString &docs );
|
||||
|
||||
// Input
|
||||
QVariant &value();
|
||||
void update();
|
||||
Kind kind() const { return Bool; }
|
||||
QString docs() const { return m_docs; }
|
||||
QString id() const { return m_id; }
|
||||
QString templateDocs() const { return m_tdocs; }
|
||||
OString docs() const { return m_docs; }
|
||||
OString id() const { return m_id; }
|
||||
OString templateDocs() const { return m_tdocs; }
|
||||
void addDependency(Input *option) { m_dependencies+=option; }
|
||||
void setEnabled(bool);
|
||||
void updateDependencies();
|
||||
bool isDefault();
|
||||
void writeValue(QTextStream &t,TextCodecAdapter *codec,bool convert);
|
||||
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
|
||||
void writeValue(QGGextStream &t,TextCodecAdapter *codec,bool convert);
|
||||
void setTemplateDocs(const OString &docs) { m_tdocs = docs; }
|
||||
static bool convertToBool(const QVariant &v,bool &isValid);
|
||||
|
||||
public slots:
|
||||
|
|
@ -49,7 +49,7 @@ class InputBool : public QObject, public Input
|
|||
|
||||
signals:
|
||||
void changed();
|
||||
void toggle(QString,bool);
|
||||
void toggle(OString,bool);
|
||||
void showHelp(Input *);
|
||||
|
||||
private slots:
|
||||
|
|
@ -62,11 +62,11 @@ class InputBool : public QObject, public Input
|
|||
bool m_enabled;
|
||||
QVariant m_value;
|
||||
QCheckBox *m_cb;
|
||||
QString m_docs;
|
||||
OString m_docs;
|
||||
QList<Input*> m_dependencies;
|
||||
QString m_id;
|
||||
OString m_id;
|
||||
QLabel *m_lab;
|
||||
QString m_tdocs;
|
||||
OString m_tdocs;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -14,12 +14,12 @@
|
|||
#include "helplabel.h"
|
||||
#include "config_msg.h"
|
||||
|
||||
#include <QSpinBox>
|
||||
#include <OSpinBox>
|
||||
#include <QGridLayout>
|
||||
#include <QWheelEvent>
|
||||
#include <QTextStream>
|
||||
#include <QGGextStream>
|
||||
|
||||
class NoWheelSpinBox : public QSpinBox
|
||||
class NoWheelSpinBox : public OSpinBox
|
||||
{
|
||||
protected:
|
||||
void wheelEvent(QWheelEvent *e)
|
||||
|
|
@ -29,9 +29,9 @@ class NoWheelSpinBox : public QSpinBox
|
|||
};
|
||||
|
||||
InputInt::InputInt( QGridLayout *layout,int &row,
|
||||
const QString & id,
|
||||
const OString & id,
|
||||
int defVal, int minVal,int maxVal,
|
||||
const QString & docs )
|
||||
const OString & docs )
|
||||
: m_default(defVal), m_minVal(minVal), m_maxVal(maxVal), m_docs(docs), m_id(id)
|
||||
{
|
||||
m_lab = new HelpLabel(id);
|
||||
|
|
@ -66,7 +66,7 @@ void InputInt::setValue(int val)
|
|||
if (val != newVal)
|
||||
{
|
||||
config_warn("argument '%d' for option %s is not a valid number in the range [%d..%d]!"
|
||||
" Using the default: %d!\n",val,qPrintable(m_id),m_minVal,m_maxVal,m_default);
|
||||
" Using the default: %d!\n",val,OPrintable(m_id),m_minVal,m_maxVal,m_default);
|
||||
newVal = m_default;
|
||||
}
|
||||
if (newVal!=m_val)
|
||||
|
|
@ -83,11 +83,11 @@ void InputInt::updateDefault()
|
|||
{
|
||||
if (m_val==m_default || !m_lab->isEnabled())
|
||||
{
|
||||
m_lab->setText(QString::fromLatin1("<qt>")+m_id+QString::fromLatin1("</qt>"));
|
||||
m_lab->setText(OString::fromLatin1("<QGG>")+m_id+OString::fromLatin1("</QGG>"));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_lab->setText(QString::fromLatin1("<qt><font color='red'>")+m_id+QString::fromLatin1("</font></qt>"));
|
||||
m_lab->setText(OString::fromLatin1("<QGG><font color='red'>")+m_id+OString::fromLatin1("</font></QGG>"));
|
||||
}
|
||||
emit changed();
|
||||
}
|
||||
|
|
@ -112,7 +112,7 @@ void InputInt::update()
|
|||
if (!ok)
|
||||
{
|
||||
config_warn("argument '%s' for option %s is not a valid number in the range [%d..%d]!"
|
||||
" Using the default: %d!\n",qPrintable(m_value.toString()),qPrintable(m_id),m_minVal,m_maxVal,m_default);
|
||||
" Using the default: %d!\n",OPrintable(m_value.toString()),OPrintable(m_id),m_minVal,m_maxVal,m_default);
|
||||
newVal = m_default;
|
||||
}
|
||||
setValue(newVal);
|
||||
|
|
@ -123,7 +123,7 @@ void InputInt::reset()
|
|||
setValue(m_default);
|
||||
}
|
||||
|
||||
void InputInt::writeValue(QTextStream &t,TextCodecAdapter *,bool)
|
||||
void InputInt::writeValue(QGGextStream &t,TextCodecAdapter *,bool)
|
||||
{
|
||||
t << m_val;
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
class QGridLayout;
|
||||
class QLabel;
|
||||
class QSpinBox;
|
||||
class OSpinBox;
|
||||
|
||||
class InputInt : public QObject, public Input
|
||||
{
|
||||
|
|
@ -26,24 +26,24 @@ class InputInt : public QObject, public Input
|
|||
|
||||
public:
|
||||
InputInt( QGridLayout *layout,int &row,
|
||||
const QString &id, int defVal,
|
||||
const OString &id, int defVal,
|
||||
int minVal, int maxVal,
|
||||
const QString &docs );
|
||||
const OString &docs );
|
||||
~InputInt() = default;
|
||||
|
||||
// Input
|
||||
QVariant &value();
|
||||
void update();
|
||||
Kind kind() const { return Int; }
|
||||
QString docs() const { return m_docs; }
|
||||
QString id() const { return m_id; }
|
||||
QString templateDocs() const { return m_tdocs; }
|
||||
OString docs() const { return m_docs; }
|
||||
OString id() const { return m_id; }
|
||||
OString templateDocs() const { return m_tdocs; }
|
||||
void addDependency(Input *) { Q_ASSERT(false); }
|
||||
void setEnabled(bool);
|
||||
void updateDependencies() {}
|
||||
bool isDefault();
|
||||
void writeValue(QTextStream &t,TextCodecAdapter *codec,bool convert);
|
||||
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
|
||||
void writeValue(QGGextStream &t,TextCodecAdapter *codec,bool convert);
|
||||
void setTemplateDocs(const OString &docs) { m_tdocs = docs; }
|
||||
|
||||
public slots:
|
||||
void reset();
|
||||
|
|
@ -59,15 +59,15 @@ class InputInt : public QObject, public Input
|
|||
private:
|
||||
void updateDefault();
|
||||
QLabel *m_lab;
|
||||
QSpinBox *m_sp;
|
||||
OSpinBox *m_sp;
|
||||
int m_val;
|
||||
int m_default;
|
||||
int m_minVal;
|
||||
int m_maxVal;
|
||||
QVariant m_value;
|
||||
QString m_docs;
|
||||
QString m_id;
|
||||
QString m_tdocs;
|
||||
OString m_docs;
|
||||
OString m_id;
|
||||
OString m_tdocs;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -18,24 +18,24 @@
|
|||
class InputObsolete : public Input
|
||||
{
|
||||
public:
|
||||
InputObsolete(const QString &id, Kind orgKind) : m_id(id), m_orgKind(orgKind) {}
|
||||
InputObsolete(const OString &id, Kind orgKind) : m_id(id), m_orgKind(orgKind) {}
|
||||
QVariant &value() { return m_value; }
|
||||
void update() {}
|
||||
Kind kind() const { return Obsolete; }
|
||||
QString docs() const { return QString(); }
|
||||
QString id() const { return m_id; }
|
||||
QString templateDocs() const { return QString(); }
|
||||
OString docs() const { return OString(); }
|
||||
OString id() const { return m_id; }
|
||||
OString templateDocs() const { return OString(); }
|
||||
void addDependency(Input *) {}
|
||||
void setEnabled(bool) {}
|
||||
void updateDependencies() {}
|
||||
void reset() {}
|
||||
bool isDefault() { return false; }
|
||||
void writeValue(QTextStream &,TextCodecAdapter *,bool) {}
|
||||
void setTemplateDocs(const QString &) {}
|
||||
void writeValue(QGGextStream &,TextCodecAdapter *,bool) {}
|
||||
void setTemplateDocs(const OString &) {}
|
||||
bool isEmpty() { return false; };
|
||||
Kind orgKind() const { return m_orgKind; }
|
||||
private:
|
||||
QString m_id;
|
||||
OString m_id;
|
||||
Kind m_orgKind;
|
||||
QVariant m_value;
|
||||
};
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include "inputstring.h"
|
||||
#include "helplabel.h"
|
||||
#include "doxywizard.h"
|
||||
#include "analzwizard.h"
|
||||
#include "config_msg.h"
|
||||
#include "config.h"
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
#include <QLineEdit>
|
||||
#include <QGridLayout>
|
||||
#include <QWheelEvent>
|
||||
#include <QToolBar>
|
||||
#include <QGGoolBar>
|
||||
#include <QFileInfo>
|
||||
#include <QFileDialog>
|
||||
|
||||
|
|
@ -35,11 +35,11 @@ class NoWheelComboBox : public QComboBox
|
|||
|
||||
|
||||
InputString::InputString( QGridLayout *layout,int &row,
|
||||
const QString & id, const QString &s,
|
||||
StringMode m, const QString &docs,
|
||||
const QString &absPath )
|
||||
const OString & id, const OString &s,
|
||||
StringMode m, const OString &docs,
|
||||
const OString &absPath )
|
||||
: m_default(s), m_sm(m), m_index(0), m_docs(docs), m_id(id),
|
||||
m_absPath(absPath==QString::fromLatin1("1"))
|
||||
m_absPath(absPath==OString::fromLatin1("1"))
|
||||
{
|
||||
m_lab = new HelpLabel(id);
|
||||
m_brFile = nullptr;
|
||||
|
|
@ -48,7 +48,7 @@ InputString::InputString( QGridLayout *layout,int &row,
|
|||
{
|
||||
layout->addWidget( m_lab, row, 0 );
|
||||
m_com = new NoWheelComboBox;
|
||||
layout->addWidget( m_com, row, 1, 1, 3, Qt::AlignLeft );
|
||||
layout->addWidget( m_com, row, 1, 1, 3, QGG::AlignLeft );
|
||||
m_le=nullptr;
|
||||
m_br=nullptr;
|
||||
m_im=nullptr;
|
||||
|
|
@ -63,26 +63,26 @@ InputString::InputString( QGridLayout *layout,int &row,
|
|||
//layout->setColumnMinimumWidth(2,150);
|
||||
if (m==StringFile || m==StringDir || m==StringImage || m==StringFileDir)
|
||||
{
|
||||
QHBoxLayout *rowLayout = new QHBoxLayout;
|
||||
OHBoxLayout *rowLayout = new OHBoxLayout;
|
||||
rowLayout->addWidget( m_le);
|
||||
m_br = new QToolBar;
|
||||
m_br->setIconSize(QSize(24,24));
|
||||
m_br = new QGGoolBar;
|
||||
m_br->setIconSize(OSize(24,24));
|
||||
if (m==StringFile || m==StringImage || m==StringFileDir)
|
||||
{
|
||||
m_brFile = m_br->addAction(QIcon(QString::fromLatin1(":/images/file.png")),QString(),this,SLOT(browseFile()));
|
||||
m_brFile = m_br->addAction(QIcon(OString::fromLatin1(":/images/file.png")),OString(),this,SLOT(browseFile()));
|
||||
m_brFile->setToolTip(tr("Browse to a file"));
|
||||
if (m==StringImage)
|
||||
{
|
||||
m_im = new QLabel;
|
||||
m_im->setMinimumSize(1,55);
|
||||
m_im->setAlignment(Qt::AlignLeft|Qt::AlignTop);
|
||||
m_im->setAlignment(QGG::AlignLeft|QGG::AlignTop);
|
||||
row++;
|
||||
layout->addWidget( m_im,row,1 );
|
||||
}
|
||||
}
|
||||
if (m==StringDir || m==StringFileDir)
|
||||
{
|
||||
m_brDir = m_br->addAction(QIcon(QString::fromLatin1(":/images/folder.png")),QString(),this,SLOT(browseDir()));
|
||||
m_brDir = m_br->addAction(QIcon(OString::fromLatin1(":/images/folder.png")),OString(),this,SLOT(browseDir()));
|
||||
m_brDir->setToolTip(tr("Browse to a folder"));
|
||||
}
|
||||
rowLayout->addWidget( m_br);
|
||||
|
|
@ -98,10 +98,10 @@ InputString::InputString( QGridLayout *layout,int &row,
|
|||
row++;
|
||||
}
|
||||
|
||||
if (m_le) connect( m_le, SIGNAL(textChanged(const QString&)),
|
||||
this, SLOT(setValue(const QString&)) );
|
||||
if (m_com) connect( m_com, SIGNAL(textActivated(const QString &)),
|
||||
this, SLOT(setValue(const QString &)) );
|
||||
if (m_le) connect( m_le, SIGNAL(textChanged(const OString&)),
|
||||
this, SLOT(setValue(const OString&)) );
|
||||
if (m_com) connect( m_com, SIGNAL(textActivated(const OString &)),
|
||||
this, SLOT(setValue(const OString &)) );
|
||||
m_str = s+QChar::fromLatin1('!'); // force update
|
||||
setValue(s);
|
||||
connect( m_lab, SIGNAL(enter()), SLOT(help()) );
|
||||
|
|
@ -119,7 +119,7 @@ InputString::~InputString()
|
|||
}
|
||||
|
||||
|
||||
void InputString::setValue(const QString &s)
|
||||
void InputString::setValue(const OString &s)
|
||||
{
|
||||
if (m_str!=s)
|
||||
{
|
||||
|
|
@ -133,11 +133,11 @@ void InputString::updateDefault()
|
|||
{
|
||||
if (m_str==m_default || !m_lab->isEnabled())
|
||||
{
|
||||
m_lab->setText(QString::fromLatin1("<qt>")+m_id+QString::fromLatin1("</qt>"));
|
||||
m_lab->setText(OString::fromLatin1("<QGG>")+m_id+OString::fromLatin1("</QGG>"));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_lab->setText(QString::fromLatin1("<qt><font color='red'>")+m_id+QString::fromLatin1("</font></qt>"));
|
||||
m_lab->setText(OString::fromLatin1("<QGG><font color='red'>")+m_id+OString::fromLatin1("</font></QGG>"));
|
||||
}
|
||||
if (m_im)
|
||||
{
|
||||
|
|
@ -150,18 +150,18 @@ void InputString::updateDefault()
|
|||
QFile Fout(m_str);
|
||||
if(!Fout.exists())
|
||||
{
|
||||
m_im->setText(tr("Sorry, cannot find file(")+m_str+QString::fromLatin1(");"));
|
||||
m_im->setText(tr("Sorry, cannot find file(")+m_str+OString::fromLatin1(");"));
|
||||
}
|
||||
else
|
||||
{
|
||||
QPixmap pm(m_str);
|
||||
OPixmap pm(m_str);
|
||||
if (!pm.isNull())
|
||||
{
|
||||
m_im->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation));
|
||||
m_im->setPixmap(pm.scaledToHeight(55,QGG::SmoothTransformation));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_im->setText(tr("Sorry, no preview available (")+m_str+QString::fromLatin1(");"));
|
||||
m_im->setText(tr("Sorry, no preview available (")+m_str+OString::fromLatin1(");"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -185,8 +185,8 @@ void InputString::setEnabled(bool state)
|
|||
|
||||
void InputString::browseFile()
|
||||
{
|
||||
QString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
QString fileName = QFileDialog::getOpenFileName(&MainWindow::instance(),
|
||||
OString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
OString fileName = QFileDialog::getOpenFileName(&MainWindow::instance(),
|
||||
tr("Select file"),path);
|
||||
if (!fileName.isNull())
|
||||
{
|
||||
|
|
@ -200,9 +200,9 @@ void InputString::browseFile()
|
|||
}
|
||||
void InputString::browseDir()
|
||||
{
|
||||
QString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
OString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
{
|
||||
QString dirName = QFileDialog::getExistingDirectory(&MainWindow::instance(),
|
||||
OString dirName = QFileDialog::getExistingDirectory(&MainWindow::instance(),
|
||||
tr("Select directory"),path);
|
||||
if (!dirName.isNull())
|
||||
{
|
||||
|
|
@ -218,10 +218,10 @@ void InputString::browseDir()
|
|||
|
||||
void InputString::clear()
|
||||
{
|
||||
setValue(QString());
|
||||
setValue(OString());
|
||||
}
|
||||
|
||||
void InputString::addValue(QString s)
|
||||
void InputString::addValue(OString s)
|
||||
{
|
||||
if (m_sm==StringFixed)
|
||||
{
|
||||
|
|
@ -253,7 +253,7 @@ void InputString::reset()
|
|||
setDefault();
|
||||
}
|
||||
|
||||
void InputString::writeValue(QTextStream &t,TextCodecAdapter *codec,bool convert)
|
||||
void InputString::writeValue(QGGextStream &t,TextCodecAdapter *codec,bool convert)
|
||||
{
|
||||
writeStringValue(t,codec,m_str,convert);
|
||||
}
|
||||
|
|
@ -263,17 +263,17 @@ bool InputString::isDefault()
|
|||
return m_str == m_default;
|
||||
}
|
||||
|
||||
QString InputString::checkEnumVal(const QString &value)
|
||||
OString InputString::checkEnumVal(const OString &value)
|
||||
{
|
||||
QString val = value.trimmed().toLower();
|
||||
QStringList::Iterator it;
|
||||
OString val = value.trimmed().toLower();
|
||||
OStringList::Iterator it;
|
||||
for ( it= m_values.begin(); it != m_values.end(); ++it )
|
||||
{
|
||||
QString enumVal = *it;
|
||||
OString enumVal = *it;
|
||||
if (enumVal.toLower() == val) return enumVal;
|
||||
}
|
||||
|
||||
config_warn("argument '%s' for option %s is not a valid enum value."
|
||||
" Using the default: %s!",qPrintable(value),qPrintable(m_id),qPrintable(m_default));
|
||||
" Using the default: %s!",OPrintable(value),OPrintable(m_id),OPrintable(m_default));
|
||||
return m_default;
|
||||
}
|
||||
|
|
@ -17,11 +17,11 @@
|
|||
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
#include <QStringList>
|
||||
#include <OStringList>
|
||||
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QToolBar;
|
||||
class QGGoolBar;
|
||||
class QComboBox;
|
||||
class QGridLayout;
|
||||
class QAction;
|
||||
|
|
@ -40,12 +40,12 @@ class InputString : public QObject, public Input
|
|||
};
|
||||
|
||||
InputString( QGridLayout *layout,int &row,
|
||||
const QString &id, const QString &s,
|
||||
const OString &id, const OString &s,
|
||||
StringMode m,
|
||||
const QString &docs,
|
||||
const QString &absPath = QString() );
|
||||
const OString &docs,
|
||||
const OString &absPath = OString() );
|
||||
~InputString();
|
||||
void addValue(QString s);
|
||||
void addValue(OString s);
|
||||
void setDefault();
|
||||
|
||||
// Input
|
||||
|
|
@ -53,21 +53,21 @@ class InputString : public QObject, public Input
|
|||
void update();
|
||||
Kind kind() const { return String; }
|
||||
StringMode stringMode() const { return m_sm; }
|
||||
QString docs() const { return m_docs; }
|
||||
QString id() const { return m_id; }
|
||||
QString templateDocs() const { return m_tdocs; }
|
||||
OString docs() const { return m_docs; }
|
||||
OString id() const { return m_id; }
|
||||
OString templateDocs() const { return m_tdocs; }
|
||||
void addDependency(Input *) { Q_ASSERT(false); }
|
||||
void setEnabled(bool);
|
||||
void updateDependencies() {}
|
||||
bool isDefault();
|
||||
void writeValue(QTextStream &t,TextCodecAdapter *codec,bool convert);
|
||||
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
|
||||
void writeValue(QGGextStream &t,TextCodecAdapter *codec,bool convert);
|
||||
void setTemplateDocs(const OString &docs) { m_tdocs = docs; }
|
||||
bool isEmpty() { return m_str.isEmpty(); }
|
||||
QString checkEnumVal(const QString &value);
|
||||
OString checkEnumVal(const OString &value);
|
||||
|
||||
public slots:
|
||||
void reset();
|
||||
void setValue(const QString&);
|
||||
void setValue(const OString&);
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
|
|
@ -84,20 +84,20 @@ class InputString : public QObject, public Input
|
|||
QLabel *m_lab;
|
||||
QLineEdit *m_le;
|
||||
QLabel *m_im;
|
||||
QToolBar *m_br;
|
||||
QGGoolBar *m_br;
|
||||
QAction *m_brFile;
|
||||
QAction *m_brDir;
|
||||
QComboBox *m_com;
|
||||
QString m_str;
|
||||
QString m_default;
|
||||
OString m_str;
|
||||
OString m_default;
|
||||
StringMode m_sm;
|
||||
QStringList m_values;
|
||||
OStringList m_values;
|
||||
int m_index;
|
||||
QVariant m_value;
|
||||
QString m_docs;
|
||||
QString m_id;
|
||||
OString m_docs;
|
||||
OString m_id;
|
||||
bool m_absPath;
|
||||
QString m_tdocs;
|
||||
OString m_tdocs;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -12,21 +12,21 @@
|
|||
|
||||
#include "inputstrlist.h"
|
||||
#include "helplabel.h"
|
||||
#include "doxywizard.h"
|
||||
#include "analzwizard.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <QToolBar>
|
||||
#include <QGGoolBar>
|
||||
#include <QGridLayout>
|
||||
#include <QLineEdit>
|
||||
#include <QListWidget>
|
||||
#include <QFileInfo>
|
||||
#include <QFileDialog>
|
||||
#include <QTextStream>
|
||||
#include <QGGextStream>
|
||||
|
||||
InputStrList::InputStrList( QGridLayout *layout,int &row,
|
||||
const QString & id,
|
||||
const QStringList &sl, ListMode lm,
|
||||
const QString & docs)
|
||||
const OString & id,
|
||||
const OStringList &sl, ListMode lm,
|
||||
const OString & docs)
|
||||
: m_default(sl), m_strList(sl), m_docs(docs), m_id(id)
|
||||
{
|
||||
m_lab = new HelpLabel( id );
|
||||
|
|
@ -34,21 +34,21 @@ InputStrList::InputStrList( QGridLayout *layout,int &row,
|
|||
m_le = new QLineEdit;
|
||||
m_le->clear();
|
||||
|
||||
QToolBar *toolBar = new QToolBar;
|
||||
toolBar->setIconSize(QSize(24,24));
|
||||
m_add = toolBar->addAction(QIcon(QString::fromLatin1(":/images/add.png")),QString(),
|
||||
QGGoolBar *toolBar = new QGGoolBar;
|
||||
toolBar->setIconSize(OSize(24,24));
|
||||
m_add = toolBar->addAction(QIcon(OString::fromLatin1(":/images/add.png")),OString(),
|
||||
this,SLOT(addString()));
|
||||
m_add->setToolTip(tr("Add item"));
|
||||
m_del = toolBar->addAction(QIcon(QString::fromLatin1(":/images/del.png")),QString(),
|
||||
m_del = toolBar->addAction(QIcon(OString::fromLatin1(":/images/del.png")),OString(),
|
||||
this,SLOT(delString()));
|
||||
m_del->setToolTip(tr("Delete selected item"));
|
||||
m_upd = toolBar->addAction(QIcon(QString::fromLatin1(":/images/refresh.png")),QString(),
|
||||
m_upd = toolBar->addAction(QIcon(OString::fromLatin1(":/images/refresh.png")),OString(),
|
||||
this,SLOT(updateString()));
|
||||
m_upd->setToolTip(tr("Update selected item"));
|
||||
|
||||
m_lb = new QListWidget;
|
||||
//m_lb->setMinimumSize(400,100);
|
||||
foreach (QString s, m_strList) m_lb->addItem(s);
|
||||
foreach (OString s, m_strList) m_lb->addItem(s);
|
||||
|
||||
m_brFile=nullptr;
|
||||
m_brDir=nullptr;
|
||||
|
|
@ -56,18 +56,18 @@ InputStrList::InputStrList( QGridLayout *layout,int &row,
|
|||
{
|
||||
if (lm&ListFile)
|
||||
{
|
||||
m_brFile = toolBar->addAction(QIcon(QString::fromLatin1(":/images/file.png")),QString(),
|
||||
m_brFile = toolBar->addAction(QIcon(OString::fromLatin1(":/images/file.png")),OString(),
|
||||
this,SLOT(browseFiles()));
|
||||
m_brFile->setToolTip(tr("Browse to a file"));
|
||||
}
|
||||
if (lm&ListDir)
|
||||
{
|
||||
m_brDir = toolBar->addAction(QIcon(QString::fromLatin1(":/images/folder.png")),QString(),
|
||||
m_brDir = toolBar->addAction(QIcon(OString::fromLatin1(":/images/folder.png")),OString(),
|
||||
this,SLOT(browseDir()));
|
||||
m_brDir->setToolTip(tr("Browse to a folder"));
|
||||
}
|
||||
}
|
||||
QHBoxLayout *rowLayout = new QHBoxLayout;
|
||||
OHBoxLayout *rowLayout = new OHBoxLayout;
|
||||
rowLayout->addWidget( m_le );
|
||||
rowLayout->addWidget( toolBar );
|
||||
layout->addWidget( m_lab, row,0 );
|
||||
|
|
@ -79,8 +79,8 @@ InputStrList::InputStrList( QGridLayout *layout,int &row,
|
|||
|
||||
connect(m_le, SIGNAL(returnPressed()),
|
||||
this, SLOT(addString()) );
|
||||
connect(m_lb, SIGNAL(currentTextChanged(const QString &)),
|
||||
this, SLOT(selectText(const QString &)));
|
||||
connect(m_lb, SIGNAL(currentTextChanged(const OString &)),
|
||||
this, SLOT(selectText(const OString &)));
|
||||
connect( m_lab, SIGNAL(enter()), SLOT(help()) );
|
||||
connect( m_lab, SIGNAL(reset()), SLOT(reset()) );
|
||||
}
|
||||
|
|
@ -130,7 +130,7 @@ void InputStrList::updateString()
|
|||
}
|
||||
}
|
||||
|
||||
void InputStrList::selectText(const QString &s)
|
||||
void InputStrList::selectText(const OString &s)
|
||||
{
|
||||
m_le->setText(s);
|
||||
}
|
||||
|
|
@ -150,15 +150,15 @@ void InputStrList::setEnabled(bool state)
|
|||
|
||||
void InputStrList::browseFiles()
|
||||
{
|
||||
QString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames();
|
||||
OString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
OStringList fileNames = QFileDialog::getOpenFileNames();
|
||||
|
||||
if (!fileNames.isEmpty())
|
||||
{
|
||||
QStringList::Iterator it;
|
||||
OStringList::Iterator it;
|
||||
for ( it= fileNames.begin(); it != fileNames.end(); ++it )
|
||||
{
|
||||
QString fileName;
|
||||
OString fileName;
|
||||
QDir dir(path);
|
||||
if (!MainWindow::instance().configFileName().isEmpty() && dir.exists())
|
||||
{
|
||||
|
|
@ -180,8 +180,8 @@ void InputStrList::browseFiles()
|
|||
|
||||
void InputStrList::browseDir()
|
||||
{
|
||||
QString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
QString dirName = QFileDialog::getExistingDirectory();
|
||||
OString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
OString dirName = QFileDialog::getExistingDirectory();
|
||||
|
||||
if (!dirName.isNull())
|
||||
{
|
||||
|
|
@ -192,7 +192,7 @@ void InputStrList::browseDir()
|
|||
}
|
||||
if (dirName.isEmpty())
|
||||
{
|
||||
dirName=QString::fromLatin1(".");
|
||||
dirName=OString::fromLatin1(".");
|
||||
}
|
||||
m_lb->addItem(dirName);
|
||||
m_strList.append(dirName);
|
||||
|
|
@ -203,7 +203,7 @@ void InputStrList::browseDir()
|
|||
}
|
||||
}
|
||||
|
||||
void InputStrList::setValue(const QStringList &sl)
|
||||
void InputStrList::setValue(const OStringList &sl)
|
||||
{
|
||||
m_le->clear();
|
||||
m_lb->clear();
|
||||
|
|
@ -229,11 +229,11 @@ void InputStrList::updateDefault()
|
|||
{
|
||||
if (isDefault() || !m_lab->isEnabled())
|
||||
{
|
||||
m_lab->setText(QString::fromLatin1("<qt>")+m_id+QString::fromLatin1("</qt>"));
|
||||
m_lab->setText(OString::fromLatin1("<QGG>")+m_id+OString::fromLatin1("</QGG>"));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_lab->setText(QString::fromLatin1("<qt><font color='red'>")+m_id+QString::fromLatin1("</font></qt>"));
|
||||
m_lab->setText(OString::fromLatin1("<QGG><font color='red'>")+m_id+OString::fromLatin1("</font></QGG>"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -242,10 +242,10 @@ void InputStrList::reset()
|
|||
setValue(m_default);
|
||||
}
|
||||
|
||||
void InputStrList::writeValue(QTextStream &t,TextCodecAdapter *codec,bool convert)
|
||||
void InputStrList::writeValue(QGGextStream &t,TextCodecAdapter *codec,bool convert)
|
||||
{
|
||||
bool first=true;
|
||||
foreach (QString s, m_strList)
|
||||
foreach (OString s, m_strList)
|
||||
{
|
||||
if (!first)
|
||||
{
|
||||
|
|
@ -312,7 +312,7 @@ bool InputStrList::isDefault()
|
|||
|
||||
bool InputStrList::isEmpty()
|
||||
{
|
||||
foreach (QString s, m_strList)
|
||||
foreach (OString s, m_strList)
|
||||
{
|
||||
if (!s.isEmpty()) return false;
|
||||
}
|
||||
|
|
@ -16,11 +16,11 @@
|
|||
#include "input.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
#include <OStringList>
|
||||
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
class OPushButton;
|
||||
class QListWidget;
|
||||
class QGridLayout;
|
||||
class QAction;
|
||||
|
|
@ -37,22 +37,22 @@ class InputStrList : public QObject, public Input
|
|||
};
|
||||
|
||||
InputStrList( QGridLayout *layout,int &row,
|
||||
const QString &id, const QStringList &sl,
|
||||
ListMode v, const QString &docs);
|
||||
void setValue(const QStringList &sl);
|
||||
const OString &id, const OStringList &sl,
|
||||
ListMode v, const OString &docs);
|
||||
void setValue(const OStringList &sl);
|
||||
|
||||
QVariant &value();
|
||||
void update();
|
||||
Kind kind() const { return StrList; }
|
||||
QString docs() const { return m_docs; }
|
||||
QString id() const { return m_id; }
|
||||
QString templateDocs() const { return m_tdocs; }
|
||||
OString docs() const { return m_docs; }
|
||||
OString id() const { return m_id; }
|
||||
OString templateDocs() const { return m_tdocs; }
|
||||
void addDependency(Input *) { Q_ASSERT(false); }
|
||||
void setEnabled(bool);
|
||||
void updateDependencies() {}
|
||||
bool isDefault();
|
||||
void writeValue(QTextStream &t,TextCodecAdapter *codec,bool convert);
|
||||
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
|
||||
void writeValue(QGGextStream &t,TextCodecAdapter *codec,bool convert);
|
||||
void setTemplateDocs(const OString &docs) { m_tdocs = docs; }
|
||||
bool isEmpty();
|
||||
|
||||
public slots:
|
||||
|
|
@ -66,7 +66,7 @@ class InputStrList : public QObject, public Input
|
|||
void addString();
|
||||
void delString();
|
||||
void updateString();
|
||||
void selectText(const QString &s);
|
||||
void selectText(const OString &s);
|
||||
void browseFiles();
|
||||
void browseDir();
|
||||
void help();
|
||||
|
|
@ -81,12 +81,12 @@ class InputStrList : public QObject, public Input
|
|||
QAction *m_brFile;
|
||||
QAction *m_brDir;
|
||||
QListWidget *m_lb;
|
||||
QStringList m_default;
|
||||
QStringList m_strList;
|
||||
OStringList m_default;
|
||||
OStringList m_strList;
|
||||
QVariant m_value;
|
||||
QString m_docs;
|
||||
QString m_id;
|
||||
QString m_tdocs;
|
||||
OString m_docs;
|
||||
OString m_id;
|
||||
OString m_tdocs;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -12,17 +12,17 @@
|
|||
|
||||
#include "wizard.h"
|
||||
#include "input.h"
|
||||
#include "doxywizard.h"
|
||||
#include "analzwizard.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QImage>
|
||||
#include <QLabel>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include <QPixmap>
|
||||
#include <QPainter>
|
||||
#include <OHBoxLayout>
|
||||
#include <OPushButton>
|
||||
#include <OPixmap>
|
||||
#include <OPainter>
|
||||
#include <QMouseEvent>
|
||||
#include <QLineEdit>
|
||||
#include <QCheckBox>
|
||||
|
|
@ -31,50 +31,50 @@
|
|||
#include <QButtonGroup>
|
||||
#include <QGroupBox>
|
||||
#include <QRadioButton>
|
||||
#include <QTreeWidget>
|
||||
#include <QStackedWidget>
|
||||
#include <QGGreeWidget>
|
||||
#include <OStackedWidget>
|
||||
#include <qdrawutil.h>
|
||||
|
||||
|
||||
// options configurable via the wizard
|
||||
#define STR_PROJECT_NAME QString::fromLatin1("PROJECT_NAME")
|
||||
#define STR_PROJECT_LOGO QString::fromLatin1("PROJECT_LOGO")
|
||||
#define STR_PROJECT_BRIEF QString::fromLatin1("PROJECT_BRIEF")
|
||||
#define STR_INPUT QString::fromLatin1("INPUT")
|
||||
#define STR_OUTPUT_DIRECTORY QString::fromLatin1("OUTPUT_DIRECTORY")
|
||||
#define STR_PROJECT_NUMBER QString::fromLatin1("PROJECT_NUMBER")
|
||||
#define STR_RECURSIVE QString::fromLatin1("RECURSIVE")
|
||||
#define STR_OPTIMIZE_OUTPUT_FOR_C QString::fromLatin1("OPTIMIZE_OUTPUT_FOR_C")
|
||||
#define STR_OPTIMIZE_OUTPUT_JAVA QString::fromLatin1("OPTIMIZE_OUTPUT_JAVA")
|
||||
#define STR_OPTIMIZE_FOR_FORTRAN QString::fromLatin1("OPTIMIZE_FOR_FORTRAN")
|
||||
#define STR_OPTIMIZE_OUTPUT_VHDL QString::fromLatin1("OPTIMIZE_OUTPUT_VHDL")
|
||||
#define STR_OPTIMIZE_OUTPUT_SLICE QString::fromLatin1("OPTIMIZE_OUTPUT_SLICE")
|
||||
#define STR_CPP_CLI_SUPPORT QString::fromLatin1("CPP_CLI_SUPPORT")
|
||||
#define STR_HIDE_SCOPE_NAMES QString::fromLatin1("HIDE_SCOPE_NAMES")
|
||||
#define STR_EXTRACT_ALL QString::fromLatin1("EXTRACT_ALL")
|
||||
#define STR_SOURCE_BROWSER QString::fromLatin1("SOURCE_BROWSER")
|
||||
#define STR_GENERATE_HTML QString::fromLatin1("GENERATE_HTML")
|
||||
#define STR_GENERATE_LATEX QString::fromLatin1("GENERATE_LATEX")
|
||||
#define STR_GENERATE_MAN QString::fromLatin1("GENERATE_MAN")
|
||||
#define STR_GENERATE_RTF QString::fromLatin1("GENERATE_RTF")
|
||||
#define STR_GENERATE_XML QString::fromLatin1("GENERATE_XML")
|
||||
#define STR_GENERATE_DOCBOOK QString::fromLatin1("GENERATE_DOCBOOK")
|
||||
#define STR_GENERATE_HTMLHELP QString::fromLatin1("GENERATE_HTMLHELP")
|
||||
#define STR_GENERATE_TREEVIEW QString::fromLatin1("GENERATE_TREEVIEW")
|
||||
#define STR_USE_PDFLATEX QString::fromLatin1("USE_PDFLATEX")
|
||||
#define STR_PDF_HYPERLINKS QString::fromLatin1("PDF_HYPERLINKS")
|
||||
#define STR_SEARCHENGINE QString::fromLatin1("SEARCHENGINE")
|
||||
#define STR_HAVE_DOT QString::fromLatin1("HAVE_DOT")
|
||||
#define STR_CLASS_GRAPH QString::fromLatin1("CLASS_GRAPH")
|
||||
#define STR_COLLABORATION_GRAPH QString::fromLatin1("COLLABORATION_GRAPH")
|
||||
#define STR_GRAPHICAL_HIERARCHY QString::fromLatin1("GRAPHICAL_HIERARCHY")
|
||||
#define STR_INCLUDE_GRAPH QString::fromLatin1("INCLUDE_GRAPH")
|
||||
#define STR_INCLUDED_BY_GRAPH QString::fromLatin1("INCLUDED_BY_GRAPH")
|
||||
#define STR_CALL_GRAPH QString::fromLatin1("CALL_GRAPH")
|
||||
#define STR_CALLER_GRAPH QString::fromLatin1("CALLER_GRAPH")
|
||||
#define STR_HTML_COLORSTYLE_HUE QString::fromLatin1("HTML_COLORSTYLE_HUE")
|
||||
#define STR_HTML_COLORSTYLE_SAT QString::fromLatin1("HTML_COLORSTYLE_SAT")
|
||||
#define STR_HTML_COLORSTYLE_GAMMA QString::fromLatin1("HTML_COLORSTYLE_GAMMA")
|
||||
#define STR_PROJECT_NAME OString::fromLatin1("PROJECT_NAME")
|
||||
#define STR_PROJECT_LOGO OString::fromLatin1("PROJECT_LOGO")
|
||||
#define STR_PROJECT_BRIEF OString::fromLatin1("PROJECT_BRIEF")
|
||||
#define STR_INPUT OString::fromLatin1("INPUT")
|
||||
#define STR_OUTPUT_DIRECTORY OString::fromLatin1("OUTPUT_DIRECTORY")
|
||||
#define STR_PROJECT_NUMBER OString::fromLatin1("PROJECT_NUMBER")
|
||||
#define STR_RECURSIVE OString::fromLatin1("RECURSIVE")
|
||||
#define STR_OPTIMIZE_OUTPUT_FOR_C OString::fromLatin1("OPTIMIZE_OUTPUT_FOR_C")
|
||||
#define STR_OPTIMIZE_OUTPUT_JAVA OString::fromLatin1("OPTIMIZE_OUTPUT_JAVA")
|
||||
#define STR_OPTIMIZE_FOR_FORTRAN OString::fromLatin1("OPTIMIZE_FOR_FORTRAN")
|
||||
#define STR_OPTIMIZE_OUTPUT_VHDL OString::fromLatin1("OPTIMIZE_OUTPUT_VHDL")
|
||||
#define STR_OPTIMIZE_OUTPUT_SLICE OString::fromLatin1("OPTIMIZE_OUTPUT_SLICE")
|
||||
#define STR_CPP_CLI_SUPPORT OString::fromLatin1("CPP_CLI_SUPPORT")
|
||||
#define STR_HIDE_SCOPE_NAMES OString::fromLatin1("HIDE_SCOPE_NAMES")
|
||||
#define STR_EXTRACT_ALL OString::fromLatin1("EXTRACT_ALL")
|
||||
#define STR_SOURCE_BROWSER OString::fromLatin1("SOURCE_BROWSER")
|
||||
#define STR_GENERATE_HTML OString::fromLatin1("GENERATE_HTML")
|
||||
#define STR_GENERATE_LATEX OString::fromLatin1("GENERATE_LATEX")
|
||||
#define STR_GENERATE_MAN OString::fromLatin1("GENERATE_MAN")
|
||||
#define STR_GENERATE_RTF OString::fromLatin1("GENERATE_RTF")
|
||||
#define STR_GENERATE_XML OString::fromLatin1("GENERATE_XML")
|
||||
#define STR_GENERATE_DOCBOOK OString::fromLatin1("GENERATE_DOCBOOK")
|
||||
#define STR_GENERATE_HTMLHELP OString::fromLatin1("GENERATE_HTMLHELP")
|
||||
#define STR_GENERATE_TREEVIEW OString::fromLatin1("GENERATE_TREEVIEW")
|
||||
#define STR_USE_PDFLATEX OString::fromLatin1("USE_PDFLATEX")
|
||||
#define STR_PDF_HYPERLINKS OString::fromLatin1("PDF_HYPERLINKS")
|
||||
#define STR_SEARCHENGINE OString::fromLatin1("SEARCHENGINE")
|
||||
#define STR_HAVE_DOT OString::fromLatin1("HAVE_DOT")
|
||||
#define STR_CLASS_GRAPH OString::fromLatin1("CLASS_GRAPH")
|
||||
#define STR_COLLABORATION_GRAPH OString::fromLatin1("COLLABORATION_GRAPH")
|
||||
#define STR_GRAPHICAL_HIERARCHY OString::fromLatin1("GRAPHICAL_HIERARCHY")
|
||||
#define STR_INCLUDE_GRAPH OString::fromLatin1("INCLUDE_GRAPH")
|
||||
#define STR_INCLUDED_BY_GRAPH OString::fromLatin1("INCLUDED_BY_GRAPH")
|
||||
#define STR_CALL_GRAPH OString::fromLatin1("CALL_GRAPH")
|
||||
#define STR_CALLER_GRAPH OString::fromLatin1("CALLER_GRAPH")
|
||||
#define STR_HTML_COLORSTYLE_HUE OString::fromLatin1("HTML_COLORSTYLE_HUE")
|
||||
#define STR_HTML_COLORSTYLE_SAT OString::fromLatin1("HTML_COLORSTYLE_SAT")
|
||||
#define STR_HTML_COLORSTYLE_GAMMA OString::fromLatin1("HTML_COLORSTYLE_GAMMA")
|
||||
|
||||
static bool g_optimizeMapping[7][7] =
|
||||
{
|
||||
|
|
@ -95,7 +95,7 @@ static bool g_optimizeMapping[7][7] =
|
|||
{ false,false,false,false,false,false,true }, // 6: SLICE
|
||||
};
|
||||
|
||||
static QString g_optimizeOptionNames[7] =
|
||||
static OString g_optimizeOptionNames[7] =
|
||||
{
|
||||
STR_OPTIMIZE_OUTPUT_FOR_C,
|
||||
STR_OPTIMIZE_OUTPUT_JAVA,
|
||||
|
|
@ -110,12 +110,12 @@ static QString g_optimizeOptionNames[7] =
|
|||
|
||||
static bool stringVariantToBool(const QVariant &v)
|
||||
{
|
||||
QString s = v.toString().toLower();
|
||||
return s==QString::fromLatin1("yes") || s==QString::fromLatin1("true") || s==QString::fromLatin1("1");
|
||||
OString s = v.toString().toLower();
|
||||
return s==OString::fromLatin1("yes") || s==OString::fromLatin1("true") || s==OString::fromLatin1("1");
|
||||
}
|
||||
|
||||
static bool getBoolOption(
|
||||
const QHash<QString,Input*>&model,const QString &name)
|
||||
const OHash<OString,Input*>&model,const OString &name)
|
||||
{
|
||||
Input *option = model[name];
|
||||
Q_ASSERT(option!=nullptr);
|
||||
|
|
@ -123,15 +123,15 @@ static bool getBoolOption(
|
|||
}
|
||||
|
||||
static int getIntOption(
|
||||
const QHash<QString,Input*>&model,const QString &name)
|
||||
const OHash<OString,Input*>&model,const OString &name)
|
||||
{
|
||||
Input *option = model[name];
|
||||
Q_ASSERT(option!=nullptr);
|
||||
return option->value().toInt();
|
||||
}
|
||||
|
||||
static QString getStringOption(
|
||||
const QHash<QString,Input*>&model,const QString &name)
|
||||
static OString getStringOption(
|
||||
const OHash<OString,Input*>&model,const OString &name)
|
||||
{
|
||||
Input *option = model[name];
|
||||
Q_ASSERT(option!=nullptr);
|
||||
|
|
@ -139,34 +139,34 @@ static QString getStringOption(
|
|||
}
|
||||
|
||||
static void updateBoolOption(
|
||||
const QHash<QString,Input*>&model,const QString &name,bool bNew)
|
||||
const OHash<OString,Input*>&model,const OString &name,bool bNew)
|
||||
{
|
||||
Input *option = model[name];
|
||||
Q_ASSERT(option!=nullptr);
|
||||
bool bOld = stringVariantToBool(option->value());
|
||||
if (bOld!=bNew)
|
||||
{
|
||||
option->value()=QString::fromLatin1(bNew ? "true" : "false");
|
||||
option->value()=OString::fromLatin1(bNew ? "true" : "false");
|
||||
option->update();
|
||||
}
|
||||
}
|
||||
|
||||
static void updateIntOption(
|
||||
const QHash<QString,Input*>&model,const QString &name,int iNew)
|
||||
const OHash<OString,Input*>&model,const OString &name,int iNew)
|
||||
{
|
||||
Input *option = model[name];
|
||||
Q_ASSERT(option!=nullptr);
|
||||
int iOld = option->value().toInt();
|
||||
if (iOld!=iNew)
|
||||
{
|
||||
option->value()=QString::fromLatin1("%1").arg(iNew);
|
||||
option->value()=OString::fromLatin1("%1").arg(iNew);
|
||||
option->update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void updateStringOption(
|
||||
const QHash<QString,Input*>&model,const QString &name,const QString &s)
|
||||
const OHash<OString,Input*>&model,const OString &name,const OString &s)
|
||||
{
|
||||
Input *option = model[name];
|
||||
Q_ASSERT(option!=nullptr);
|
||||
|
|
@ -183,17 +183,17 @@ TuneColorDialog::TuneColorDialog(int hue,int sat,int gamma,QWidget *parent) : QD
|
|||
{
|
||||
setWindowTitle(tr("Tune the color of the HTML output"));
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
m_image = new QImage(QString::fromLatin1(":/images/tunecolor.png"));
|
||||
m_image = new QImage(OString::fromLatin1(":/images/tunecolor.png"));
|
||||
m_imageLab = new QLabel;
|
||||
updateImage(hue,sat,gamma);
|
||||
layout->addWidget(new QLabel(tr("Example output: use the sliders on the right to adjust the color")),0,0);
|
||||
layout->addWidget(m_imageLab,1,0);
|
||||
QHBoxLayout *buttonsLayout = new QHBoxLayout;
|
||||
OHBoxLayout *buttonsLayout = new OHBoxLayout;
|
||||
|
||||
QPushButton *okButton = new QPushButton(tr("Ok"));
|
||||
OPushButton *okButton = new OPushButton(tr("Ok"));
|
||||
connect(okButton,SIGNAL(clicked()),SLOT(accept()));
|
||||
okButton->setDefault(true);
|
||||
QPushButton *cancelButton = new QPushButton(tr("Cancel"));
|
||||
OPushButton *cancelButton = new OPushButton(tr("Cancel"));
|
||||
connect(cancelButton,SIGNAL(clicked()),SLOT(reject()));
|
||||
|
||||
ColorPicker *huePicker = new ColorPicker(ColorPicker::Hue);
|
||||
|
|
@ -304,7 +304,7 @@ void TuneColorDialog::updateImage(int hue,int sat,int gam)
|
|||
hsl2rgb(hue/359.0, sat/255.0, pow(c.green()/255.0,gam/100.0),&r,&g,&b);
|
||||
*dstPixel = qRgb((int)(r*255.0),(int)(g*255.0),(int)(b*255.0));
|
||||
}
|
||||
m_imageLab->setPixmap(QPixmap::fromImage(coloredImg));
|
||||
m_imageLab->setPixmap(OPixmap::fromImage(coloredImg));
|
||||
m_hue = hue;
|
||||
m_sat = sat;
|
||||
m_gam = gam;
|
||||
|
|
@ -341,7 +341,7 @@ ColorPicker::~ColorPicker()
|
|||
delete m_pix;
|
||||
}
|
||||
|
||||
void ColorPicker::paintEvent(QPaintEvent*)
|
||||
void ColorPicker::paintEvent(OPaintEvent*)
|
||||
{
|
||||
int w = width() - 5;
|
||||
|
||||
|
|
@ -368,15 +368,15 @@ void ColorPicker::paintEvent(QPaintEvent*)
|
|||
++pixel;
|
||||
}
|
||||
}
|
||||
m_pix = new QPixmap(QPixmap::fromImage(img));
|
||||
m_pix = new OPixmap(OPixmap::fromImage(img));
|
||||
}
|
||||
QPainter p(this);
|
||||
OPainter p(this);
|
||||
p.drawPixmap(1, coff, *m_pix);
|
||||
const QPalette &g = palette();
|
||||
const OPalette &g = palette();
|
||||
qDrawShadePanel(&p, r, g, true);
|
||||
p.setPen(g.windowText().color());
|
||||
p.setBrush(g.windowText());
|
||||
QPolygon a;
|
||||
OPolygon a;
|
||||
int y = m_mode==Hue ? hue2y(m_hue) :
|
||||
m_mode==Saturation ? sat2y(m_sat) :
|
||||
gam2y(m_gam);
|
||||
|
|
@ -476,7 +476,7 @@ int ColorPicker::gam2y(int g)
|
|||
|
||||
//==========================================================================
|
||||
|
||||
Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(wizard), m_modelData(modelData)
|
||||
Step1::Step1(Wizard *wizard,const OHash<OString,Input*> &modelData) : m_wizard(wizard), m_modelData(modelData)
|
||||
{
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
layout->setContentsMargins(4,4,4,4);
|
||||
|
|
@ -492,20 +492,20 @@ Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(w
|
|||
// project name
|
||||
QLabel *projName = new QLabel(this);
|
||||
projName->setText(tr("Project name:"));
|
||||
projName->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
projName->setAlignment(QGG::AlignRight|QGG::AlignVCenter);
|
||||
// project brief
|
||||
QLabel *projBrief = new QLabel(this);
|
||||
projBrief->setText(tr("Project synopsis:"));
|
||||
projBrief->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
projBrief->setAlignment(QGG::AlignRight|QGG::AlignVCenter);
|
||||
// project version
|
||||
QLabel *projVersion = new QLabel(this);
|
||||
projVersion->setText(tr("Project version or id:"));
|
||||
projVersion->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
projVersion->setAlignment(QGG::AlignRight|QGG::AlignVCenter);
|
||||
// project icon
|
||||
QLabel *projLogo = new QLabel(this);
|
||||
projLogo->setMinimumSize(1,55);
|
||||
projLogo->setText(tr("Project logo:"));
|
||||
projLogo->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
projLogo->setAlignment(QGG::AlignRight|QGG::AlignVCenter);
|
||||
|
||||
grid->addWidget(projName,0,0);
|
||||
grid->addWidget(projBrief,1,0);
|
||||
|
|
@ -515,7 +515,7 @@ Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(w
|
|||
m_projName = new QLineEdit;
|
||||
m_projBrief = new QLineEdit;
|
||||
m_projNumber = new QLineEdit;
|
||||
QPushButton *projIconSel = new QPushButton(this);
|
||||
OPushButton *projIconSel = new OPushButton(this);
|
||||
projIconSel->setText(tr("Select..."));
|
||||
m_projIconLab = new QLabel;
|
||||
|
||||
|
|
@ -540,13 +540,13 @@ Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(w
|
|||
l->setText(tr("Specify the directory to scan for source code"));
|
||||
layout->addWidget(l);
|
||||
QWidget *row = new QWidget;
|
||||
QHBoxLayout *rowLayout = new QHBoxLayout(row);
|
||||
OHBoxLayout *rowLayout = new OHBoxLayout(row);
|
||||
rowLayout->setSpacing(10);
|
||||
l = new QLabel(this);
|
||||
l->setText(tr("Source code directory:"));
|
||||
rowLayout->addWidget(l);
|
||||
m_sourceDir = new QLineEdit;
|
||||
m_srcSelectDir = new QPushButton(this);
|
||||
m_srcSelectDir = new OPushButton(this);
|
||||
m_srcSelectDir->setText(tr("Select..."));
|
||||
rowLayout->addWidget(m_sourceDir);
|
||||
rowLayout->addWidget(m_srcSelectDir);
|
||||
|
|
@ -563,17 +563,17 @@ Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(w
|
|||
layout->addWidget(f);
|
||||
|
||||
l = new QLabel(this);
|
||||
l->setText(tr("Specify the directory where doxygen should "
|
||||
l->setText(tr("Specify the directory where analyze should "
|
||||
"put the generated documentation"));
|
||||
layout->addWidget(l);
|
||||
row = new QWidget;
|
||||
rowLayout = new QHBoxLayout(row);
|
||||
rowLayout = new OHBoxLayout(row);
|
||||
rowLayout->setSpacing(10);
|
||||
l = new QLabel(this);
|
||||
l->setText(tr("Destination directory:"));
|
||||
rowLayout->addWidget(l);
|
||||
m_destDir = new QLineEdit;
|
||||
m_dstSelectDir = new QPushButton(this);
|
||||
m_dstSelectDir = new OPushButton(this);
|
||||
m_dstSelectDir->setText(tr("Select..."));
|
||||
rowLayout->addWidget(m_destDir);
|
||||
rowLayout->addWidget(m_dstSelectDir);
|
||||
|
|
@ -587,18 +587,18 @@ Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(w
|
|||
this,SLOT(selectSourceDir()));
|
||||
connect(m_dstSelectDir,SIGNAL(clicked()),
|
||||
this,SLOT(selectDestinationDir()));
|
||||
connect(m_projName,SIGNAL(textChanged(const QString &)),SLOT(setProjectName(const QString &)));
|
||||
connect(m_projBrief,SIGNAL(textChanged(const QString &)),SLOT(setProjectBrief(const QString &)));
|
||||
connect(m_projNumber,SIGNAL(textChanged(const QString &)),SLOT(setProjectNumber(const QString &)));
|
||||
connect(m_sourceDir,SIGNAL(textChanged(const QString &)),SLOT(setSourceDir(const QString &)));
|
||||
connect(m_projName,SIGNAL(textChanged(const OString &)),SLOT(setProjectName(const OString &)));
|
||||
connect(m_projBrief,SIGNAL(textChanged(const OString &)),SLOT(setProjectBrief(const OString &)));
|
||||
connect(m_projNumber,SIGNAL(textChanged(const OString &)),SLOT(setProjectNumber(const OString &)));
|
||||
connect(m_sourceDir,SIGNAL(textChanged(const OString &)),SLOT(setSourceDir(const OString &)));
|
||||
connect(m_recursive,SIGNAL(stateChanged(int)),SLOT(setRecursiveScan(int)));
|
||||
connect(m_destDir,SIGNAL(textChanged(const QString &)),SLOT(setDestinationDir(const QString &)));
|
||||
connect(m_destDir,SIGNAL(textChanged(const OString &)),SLOT(setDestinationDir(const OString &)));
|
||||
}
|
||||
|
||||
void Step1::selectProjectIcon()
|
||||
{
|
||||
QString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
QString iconName = QFileDialog::getOpenFileName(this,
|
||||
OString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
OString iconName = QFileDialog::getOpenFileName(this,
|
||||
tr("Select project icon/image"),path);
|
||||
if (iconName.isEmpty())
|
||||
{
|
||||
|
|
@ -609,18 +609,18 @@ void Step1::selectProjectIcon()
|
|||
QFile Fout(iconName);
|
||||
if(!Fout.exists())
|
||||
{
|
||||
m_projIconLab->setText(tr("Sorry, cannot find file(")+iconName+QString::fromLatin1(");"));
|
||||
m_projIconLab->setText(tr("Sorry, cannot find file(")+iconName+OString::fromLatin1(");"));
|
||||
}
|
||||
else
|
||||
{
|
||||
QPixmap pm(iconName);
|
||||
OPixmap pm(iconName);
|
||||
if (!pm.isNull())
|
||||
{
|
||||
m_projIconLab->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation));
|
||||
m_projIconLab->setPixmap(pm.scaledToHeight(55,QGG::SmoothTransformation));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_projIconLab->setText(tr("Sorry, no preview available (")+iconName+QString::fromLatin1(");"));
|
||||
m_projIconLab->setText(tr("Sorry, no preview available (")+iconName+OString::fromLatin1(");"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -629,8 +629,8 @@ void Step1::selectProjectIcon()
|
|||
|
||||
void Step1::selectSourceDir()
|
||||
{
|
||||
QString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
QString dirName = QFileDialog::getExistingDirectory(this,
|
||||
OString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
OString dirName = QFileDialog::getExistingDirectory(this,
|
||||
tr("Select source directory"),path);
|
||||
QDir dir(path);
|
||||
if (!MainWindow::instance().configFileName().isEmpty() && dir.exists())
|
||||
|
|
@ -639,15 +639,15 @@ void Step1::selectSourceDir()
|
|||
}
|
||||
if (dirName.isEmpty())
|
||||
{
|
||||
dirName=QString::fromLatin1(".");
|
||||
dirName=OString::fromLatin1(".");
|
||||
}
|
||||
m_sourceDir->setText(dirName);
|
||||
}
|
||||
|
||||
void Step1::selectDestinationDir()
|
||||
{
|
||||
QString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
QString dirName = QFileDialog::getExistingDirectory(this,
|
||||
OString path = QFileInfo(MainWindow::instance().configFileName()).path();
|
||||
OString dirName = QFileDialog::getExistingDirectory(this,
|
||||
tr("Select destination directory"),path);
|
||||
QDir dir(path);
|
||||
if (!MainWindow::instance().configFileName().isEmpty() && dir.exists())
|
||||
|
|
@ -656,32 +656,32 @@ void Step1::selectDestinationDir()
|
|||
}
|
||||
if (dirName.isEmpty())
|
||||
{
|
||||
dirName=QString::fromLatin1(".");
|
||||
dirName=OString::fromLatin1(".");
|
||||
}
|
||||
m_destDir->setText(dirName);
|
||||
}
|
||||
|
||||
void Step1::setProjectName(const QString &name)
|
||||
void Step1::setProjectName(const OString &name)
|
||||
{
|
||||
updateStringOption(m_modelData,STR_PROJECT_NAME,name);
|
||||
}
|
||||
|
||||
void Step1::setProjectBrief(const QString &desc)
|
||||
void Step1::setProjectBrief(const OString &desc)
|
||||
{
|
||||
updateStringOption(m_modelData,STR_PROJECT_BRIEF,desc);
|
||||
}
|
||||
|
||||
void Step1::setProjectNumber(const QString &num)
|
||||
void Step1::setProjectNumber(const OString &num)
|
||||
{
|
||||
updateStringOption(m_modelData,STR_PROJECT_NUMBER,num);
|
||||
}
|
||||
|
||||
void Step1::setSourceDir(const QString &dir)
|
||||
void Step1::setSourceDir(const OString &dir)
|
||||
{
|
||||
Input *option = m_modelData[STR_INPUT];
|
||||
if (option->value().toStringList().count()>0)
|
||||
{
|
||||
QStringList sl = option->value().toStringList();
|
||||
OStringList sl = option->value().toStringList();
|
||||
if (sl[0]!=dir)
|
||||
{
|
||||
sl[0] = dir;
|
||||
|
|
@ -691,19 +691,19 @@ void Step1::setSourceDir(const QString &dir)
|
|||
}
|
||||
else
|
||||
{
|
||||
option->value() = QStringList() << dir;
|
||||
option->value() = OStringList() << dir;
|
||||
option->update();
|
||||
}
|
||||
}
|
||||
|
||||
void Step1::setDestinationDir(const QString &dir)
|
||||
void Step1::setDestinationDir(const OString &dir)
|
||||
{
|
||||
updateStringOption(m_modelData,STR_OUTPUT_DIRECTORY,dir);
|
||||
}
|
||||
|
||||
void Step1::setRecursiveScan(int s)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_RECURSIVE,s==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_RECURSIVE,s==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step1::init()
|
||||
|
|
@ -712,24 +712,24 @@ void Step1::init()
|
|||
m_projName->setText(getStringOption(m_modelData,STR_PROJECT_NAME));
|
||||
m_projBrief->setText(getStringOption(m_modelData,STR_PROJECT_BRIEF));
|
||||
m_projNumber->setText(getStringOption(m_modelData,STR_PROJECT_NUMBER));
|
||||
QString iconName = getStringOption(m_modelData,STR_PROJECT_LOGO);
|
||||
OString iconName = getStringOption(m_modelData,STR_PROJECT_LOGO);
|
||||
if (!iconName.isEmpty())
|
||||
{
|
||||
QFile Fout(iconName);
|
||||
if(!Fout.exists())
|
||||
{
|
||||
m_projIconLab->setText(tr("Sorry, cannot find file(")+iconName+QString::fromLatin1(");"));
|
||||
m_projIconLab->setText(tr("Sorry, cannot find file(")+iconName+OString::fromLatin1(");"));
|
||||
}
|
||||
else
|
||||
{
|
||||
QPixmap pm(iconName);
|
||||
OPixmap pm(iconName);
|
||||
if (!pm.isNull())
|
||||
{
|
||||
m_projIconLab->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation));
|
||||
m_projIconLab->setPixmap(pm.scaledToHeight(55,QGG::SmoothTransformation));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_projIconLab->setText(tr("Sorry, no preview available (")+iconName+QString::fromLatin1(");"));
|
||||
m_projIconLab->setText(tr("Sorry, no preview available (")+iconName+OString::fromLatin1(");"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -743,14 +743,14 @@ void Step1::init()
|
|||
m_sourceDir->setText(option->value().toStringList().first());
|
||||
}
|
||||
m_recursive->setChecked(
|
||||
getBoolOption(m_modelData,STR_RECURSIVE) ? Qt::Checked : Qt::Unchecked);
|
||||
getBoolOption(m_modelData,STR_RECURSIVE) ? QGG::Checked : QGG::Unchecked);
|
||||
m_destDir->setText(getStringOption(m_modelData,STR_OUTPUT_DIRECTORY));
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
|
||||
Step2::Step2(Wizard *wizard,const QHash<QString,Input*> &modelData)
|
||||
Step2::Step2(Wizard *wizard,const OHash<OString,Input*> &modelData)
|
||||
: m_wizard(wizard), m_modelData(modelData)
|
||||
{
|
||||
QRadioButton *r;
|
||||
|
|
@ -864,7 +864,7 @@ Step2::Step2(Wizard *wizard,const QHash<QString,Input*> &modelData)
|
|||
|
||||
connect(m_crossRef,SIGNAL(stateChanged(int)),
|
||||
SLOT(changeCrossRefState(int)));
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
||||
#if QGG_VERSION < QGG_VERSION_CHECK(5, 15, 0)
|
||||
connect(m_optimizeLangGroup,SIGNAL(buttonClicked(int)),
|
||||
SLOT(optimizeFor(int)));
|
||||
connect(m_extractModeGroup,SIGNAL(buttonClicked(int)),
|
||||
|
|
@ -895,7 +895,7 @@ void Step2::extractMode(int choice)
|
|||
|
||||
void Step2::changeCrossRefState(int choice)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_SOURCE_BROWSER,choice==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_SOURCE_BROWSER,choice==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step2::init()
|
||||
|
|
@ -916,7 +916,7 @@ void Step2::init()
|
|||
|
||||
//==========================================================================
|
||||
|
||||
Step3::Step3(Wizard *wizard,const QHash<QString,Input*> &modelData)
|
||||
Step3::Step3(Wizard *wizard,const OHash<OString,Input*> &modelData)
|
||||
: m_wizard(wizard), m_modelData(modelData)
|
||||
{
|
||||
QVBoxLayout *vbox = nullptr;
|
||||
|
|
@ -945,8 +945,8 @@ Step3::Step3(Wizard *wizard,const QHash<QString,Input*> &modelData)
|
|||
m_searchEnabled=new QCheckBox(tr("With search function"));
|
||||
vbox->addWidget(m_searchEnabled);
|
||||
// SEARCH_ENGINE
|
||||
QHBoxLayout *hbox = new QHBoxLayout;
|
||||
m_tuneColor=new QPushButton(tr("Change color..."));
|
||||
OHBoxLayout *hbox = new OHBoxLayout;
|
||||
m_tuneColor=new OPushButton(tr("Change color..."));
|
||||
hbox->addWidget(m_tuneColor);
|
||||
hbox->addStretch(1);
|
||||
vbox->addLayout(hbox);
|
||||
|
|
@ -1001,7 +1001,7 @@ Step3::Step3(Wizard *wizard,const QHash<QString,Input*> &modelData)
|
|||
connect(m_xmlEnabled,SIGNAL(stateChanged(int)),SLOT(setXmlEnabled(int)));
|
||||
connect(m_docbookEnabled,SIGNAL(stateChanged(int)),SLOT(setDocbookEnabled(int)));
|
||||
connect(m_searchEnabled,SIGNAL(stateChanged(int)),SLOT(setSearchEnabled(int)));
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
||||
#if QGG_VERSION < QGG_VERSION_CHECK(5, 15, 0)
|
||||
connect(m_htmlOptionsGroup,SIGNAL(buttonClicked(int)),SLOT(setHtmlOptions(int)));
|
||||
connect(m_texOptionsGroup,SIGNAL(buttonClicked(int)),SLOT(setLatexOptions(int)));
|
||||
#else
|
||||
|
|
@ -1037,27 +1037,27 @@ void Step3::setLatexEnabled(bool b)
|
|||
|
||||
void Step3::setManEnabled(int state)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_GENERATE_MAN,state==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_GENERATE_MAN,state==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step3::setRtfEnabled(int state)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_GENERATE_RTF,state==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_GENERATE_RTF,state==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step3::setXmlEnabled(int state)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_GENERATE_XML,state==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_GENERATE_XML,state==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step3::setDocbookEnabled(int state)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_GENERATE_DOCBOOK,state==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_GENERATE_DOCBOOK,state==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step3::setSearchEnabled(int state)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_SEARCHENGINE,state==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_SEARCHENGINE,state==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step3::setHtmlOptions(int id)
|
||||
|
|
@ -1135,7 +1135,7 @@ void Step3::init()
|
|||
|
||||
//==========================================================================
|
||||
|
||||
Step4::Step4(Wizard *wizard,const QHash<QString,Input*> &modelData)
|
||||
Step4::Step4(Wizard *wizard,const OHash<OString,Input*> &modelData)
|
||||
: m_wizard(wizard), m_modelData(modelData)
|
||||
{
|
||||
m_diagramModeGroup = new QButtonGroup(this);
|
||||
|
|
@ -1196,7 +1196,7 @@ Step4::Step4(Wizard *wizard,const QHash<QString,Input*> &modelData)
|
|||
m_dotCollaboration->setChecked(true);
|
||||
gbox->setRowStretch(6,1);
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
||||
#if QGG_VERSION < QGG_VERSION_CHECK(5, 15, 0)
|
||||
connect(m_diagramModeGroup,SIGNAL(buttonClicked(int)),
|
||||
this,SLOT(diagramModeChanged(int)));
|
||||
#else
|
||||
|
|
@ -1224,78 +1224,78 @@ void Step4::diagramModeChanged(int id)
|
|||
if (id==0) // no diagrams
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_HAVE_DOT,false);
|
||||
updateStringOption(m_modelData,STR_CLASS_GRAPH, QString::fromLatin1("NO"));
|
||||
updateStringOption(m_modelData,STR_CLASS_GRAPH, OString::fromLatin1("NO"));
|
||||
}
|
||||
else if (id==1) // text only
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_HAVE_DOT,false);
|
||||
updateStringOption(m_modelData,STR_CLASS_GRAPH, QString::fromLatin1("TEXT"));
|
||||
updateStringOption(m_modelData,STR_CLASS_GRAPH, OString::fromLatin1("TEXT"));
|
||||
}
|
||||
else if (id==2) // builtin diagrams
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_HAVE_DOT,false);
|
||||
updateStringOption(m_modelData,STR_CLASS_GRAPH, QString::fromLatin1("YES"));
|
||||
updateStringOption(m_modelData,STR_CLASS_GRAPH, OString::fromLatin1("YES"));
|
||||
}
|
||||
else if (id==3) // dot diagrams
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_HAVE_DOT,true);
|
||||
updateStringOption(m_modelData,STR_CLASS_GRAPH, QString::fromLatin1("YES"));
|
||||
updateStringOption(m_modelData,STR_CLASS_GRAPH, OString::fromLatin1("YES"));
|
||||
}
|
||||
m_dotGroup->setEnabled(id==3);
|
||||
}
|
||||
|
||||
void Step4::setClassGraphEnabled(int state)
|
||||
{
|
||||
QString classGraph = getStringOption(m_modelData,STR_CLASS_GRAPH);
|
||||
if (state==Qt::Checked)
|
||||
OString classGraph = getStringOption(m_modelData,STR_CLASS_GRAPH);
|
||||
if (state==QGG::Checked)
|
||||
{
|
||||
updateStringOption(m_modelData,STR_CLASS_GRAPH,QString::fromLatin1("YES"));
|
||||
updateStringOption(m_modelData,STR_CLASS_GRAPH,OString::fromLatin1("YES"));
|
||||
}
|
||||
else if (classGraph==QString::fromLatin1("YES") || classGraph==QString::fromLatin1("GRAPH"))
|
||||
else if (classGraph==OString::fromLatin1("YES") || classGraph==OString::fromLatin1("GRAPH"))
|
||||
{
|
||||
updateStringOption(m_modelData,STR_CLASS_GRAPH,QString::fromLatin1("NO"));
|
||||
updateStringOption(m_modelData,STR_CLASS_GRAPH,OString::fromLatin1("NO"));
|
||||
}
|
||||
}
|
||||
|
||||
void Step4::setCollaborationGraphEnabled(int state)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_COLLABORATION_GRAPH,state==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_COLLABORATION_GRAPH,state==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step4::setGraphicalHierarchyEnabled(int state)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_GRAPHICAL_HIERARCHY,state==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_GRAPHICAL_HIERARCHY,state==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step4::setIncludeGraphEnabled(int state)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_INCLUDE_GRAPH,state==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_INCLUDE_GRAPH,state==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step4::setIncludedByGraphEnabled(int state)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_INCLUDED_BY_GRAPH,state==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_INCLUDED_BY_GRAPH,state==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step4::setCallGraphEnabled(int state)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_CALL_GRAPH,state==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_CALL_GRAPH,state==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step4::setCallerGraphEnabled(int state)
|
||||
{
|
||||
updateBoolOption(m_modelData,STR_CALLER_GRAPH,state==Qt::Checked);
|
||||
updateBoolOption(m_modelData,STR_CALLER_GRAPH,state==QGG::Checked);
|
||||
}
|
||||
|
||||
void Step4::init()
|
||||
{
|
||||
int id = 0;
|
||||
QString classGraph = getStringOption(m_modelData,STR_CLASS_GRAPH).toLower();
|
||||
if (classGraph==QString::fromLatin1("yes") || classGraph==QString::fromLatin1("graph"))
|
||||
OString classGraph = getStringOption(m_modelData,STR_CLASS_GRAPH).toLower();
|
||||
if (classGraph==OString::fromLatin1("yes") || classGraph==OString::fromLatin1("graph"))
|
||||
{
|
||||
id = getBoolOption(m_modelData,STR_HAVE_DOT) ? 3 : 2;
|
||||
}
|
||||
else if (classGraph==QString::fromLatin1("text"))
|
||||
else if (classGraph==OString::fromLatin1("text"))
|
||||
{
|
||||
id = 1;
|
||||
}
|
||||
|
|
@ -1316,20 +1316,20 @@ void Step4::init()
|
|||
|
||||
//==========================================================================
|
||||
|
||||
Wizard::Wizard(const QHash<QString,Input*> &modelData, QWidget *parent) :
|
||||
QSplitter(parent), m_modelData(modelData)
|
||||
Wizard::Wizard(const OHash<OString,Input*> &modelData, QWidget *parent) :
|
||||
OSplitter(parent), m_modelData(modelData)
|
||||
{
|
||||
m_treeWidget = new QTreeWidget;
|
||||
m_treeWidget = new QGGreeWidget;
|
||||
m_treeWidget->setColumnCount(1);
|
||||
m_treeWidget->setHeaderLabels(QStringList() << QString::fromLatin1("Topics"));
|
||||
QList<QTreeWidgetItem*> items;
|
||||
items.append(new QTreeWidgetItem((QTreeWidget*)nullptr,QStringList(tr("Project"))));
|
||||
items.append(new QTreeWidgetItem((QTreeWidget*)nullptr,QStringList(tr("Mode"))));
|
||||
items.append(new QTreeWidgetItem((QTreeWidget*)nullptr,QStringList(tr("Output"))));
|
||||
items.append(new QTreeWidgetItem((QTreeWidget*)nullptr,QStringList(tr("Diagrams"))));
|
||||
m_treeWidget->setHeaderLabels(OStringList() << OString::fromLatin1("Topics"));
|
||||
QList<QGGreeWidgetItem*> items;
|
||||
items.append(new QGGreeWidgetItem((QGGreeWidget*)nullptr,OStringList(tr("Project"))));
|
||||
items.append(new QGGreeWidgetItem((QGGreeWidget*)nullptr,OStringList(tr("Mode"))));
|
||||
items.append(new QGGreeWidgetItem((QGGreeWidget*)nullptr,OStringList(tr("Output"))));
|
||||
items.append(new QGGreeWidgetItem((QGGreeWidget*)nullptr,OStringList(tr("Diagrams"))));
|
||||
m_treeWidget->insertTopLevelItems(0,items);
|
||||
|
||||
m_topicStack = new QStackedWidget;
|
||||
m_topicStack = new OStackedWidget;
|
||||
m_step1 = new Step1(this,modelData);
|
||||
m_step2 = new Step2(this,modelData);
|
||||
m_step3 = new Step3(this,modelData);
|
||||
|
|
@ -1341,20 +1341,20 @@ Wizard::Wizard(const QHash<QString,Input*> &modelData, QWidget *parent) :
|
|||
|
||||
QWidget *rightSide = new QWidget;
|
||||
QGridLayout *grid = new QGridLayout(rightSide);
|
||||
m_prev = new QPushButton(tr("Previous"));
|
||||
m_prev = new OPushButton(tr("Previous"));
|
||||
m_prev->setEnabled(false);
|
||||
m_next = new QPushButton(tr("Next"));
|
||||
m_next = new OPushButton(tr("Next"));
|
||||
grid->addWidget(m_topicStack,0,0,1,2);
|
||||
grid->addWidget(m_prev,1,0,Qt::AlignLeft);
|
||||
grid->addWidget(m_next,1,1,Qt::AlignRight);
|
||||
grid->addWidget(m_prev,1,0,QGG::AlignLeft);
|
||||
grid->addWidget(m_next,1,1,QGG::AlignRight);
|
||||
grid->setColumnStretch(0,1);
|
||||
grid->setRowStretch(0,1);
|
||||
addWidget(m_treeWidget);
|
||||
addWidget(rightSide);
|
||||
|
||||
connect(m_treeWidget,
|
||||
SIGNAL(currentItemChanged(QTreeWidgetItem *,QTreeWidgetItem *)),
|
||||
SLOT(activateTopic(QTreeWidgetItem *,QTreeWidgetItem *)));
|
||||
SIGNAL(currentItemChanged(QGGreeWidgetItem *,QGGreeWidgetItem *)),
|
||||
SLOT(activateTopic(QGGreeWidgetItem *,QGGreeWidgetItem *)));
|
||||
connect(m_next,SIGNAL(clicked()),SLOT(nextTopic()));
|
||||
connect(m_prev,SIGNAL(clicked()),SLOT(prevTopic()));
|
||||
|
||||
|
|
@ -1365,12 +1365,12 @@ Wizard::~Wizard()
|
|||
{
|
||||
}
|
||||
|
||||
void Wizard::activateTopic(QTreeWidgetItem *item,QTreeWidgetItem *)
|
||||
void Wizard::activateTopic(QGGreeWidgetItem *item,QGGreeWidgetItem *)
|
||||
{
|
||||
if (item)
|
||||
{
|
||||
|
||||
QString label = item->text(0);
|
||||
OString label = item->text(0);
|
||||
if (label==tr("Project"))
|
||||
{
|
||||
m_topicStack->setCurrentWidget(m_step1);
|
||||
|
|
@ -13,17 +13,17 @@
|
|||
#ifndef WIZARD_H
|
||||
#define WIZARD_H
|
||||
|
||||
#include <QSplitter>
|
||||
#include <QHash>
|
||||
#include <OSplitter>
|
||||
#include <OHash>
|
||||
#include <QDialog>
|
||||
|
||||
class Input;
|
||||
class QTreeWidget;
|
||||
class QTreeWidgetItem;
|
||||
class QStackedWidget;
|
||||
class QGGreeWidget;
|
||||
class QGGreeWidgetItem;
|
||||
class OStackedWidget;
|
||||
class QCheckBox;
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
class OPushButton;
|
||||
class QRadioButton;
|
||||
class QGroupBox;
|
||||
class QButtonGroup;
|
||||
|
|
@ -68,7 +68,7 @@ signals:
|
|||
void newHsv(int h, int s, int g);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*);
|
||||
void paintEvent(OPaintEvent*);
|
||||
void mouseMoveEvent(QMouseEvent *);
|
||||
void mousePressEvent(QMouseEvent *);
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ private:
|
|||
void setSat(int v);
|
||||
void setGam(int v);
|
||||
|
||||
QPixmap *m_pix = nullptr;
|
||||
OPixmap *m_pix = nullptr;
|
||||
Mode m_mode = Hue;
|
||||
int m_gam = 0;
|
||||
int m_hue = 0;
|
||||
|
|
@ -98,18 +98,18 @@ class Step1 : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Step1(Wizard *parent,const QHash<QString,Input*> &modelData);
|
||||
Step1(Wizard *parent,const OHash<OString,Input*> &modelData);
|
||||
void init();
|
||||
|
||||
private slots:
|
||||
void selectSourceDir();
|
||||
void selectDestinationDir();
|
||||
void selectProjectIcon();
|
||||
void setProjectName(const QString &name);
|
||||
void setProjectBrief(const QString &desc);
|
||||
void setProjectNumber(const QString &num);
|
||||
void setSourceDir(const QString &dir);
|
||||
void setDestinationDir(const QString &dir);
|
||||
void setProjectName(const OString &name);
|
||||
void setProjectBrief(const OString &desc);
|
||||
void setProjectNumber(const OString &num);
|
||||
void setSourceDir(const OString &dir);
|
||||
void setDestinationDir(const OString &dir);
|
||||
void setRecursiveScan(int);
|
||||
|
||||
private:
|
||||
|
|
@ -120,17 +120,17 @@ class Step1 : public QWidget
|
|||
QLineEdit *m_destDir = nullptr;
|
||||
QLabel *m_projIconLab = nullptr;
|
||||
QCheckBox *m_recursive = nullptr;
|
||||
QPushButton *m_srcSelectDir = nullptr;
|
||||
QPushButton *m_dstSelectDir = nullptr;
|
||||
OPushButton *m_srcSelectDir = nullptr;
|
||||
OPushButton *m_dstSelectDir = nullptr;
|
||||
Wizard *m_wizard = nullptr;
|
||||
const QHash<QString,Input *> &m_modelData;
|
||||
const OHash<OString,Input *> &m_modelData;
|
||||
};
|
||||
|
||||
class Step2 : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Step2(Wizard *parent,const QHash<QString,Input*> &modelData);
|
||||
Step2(Wizard *parent,const OHash<OString,Input*> &modelData);
|
||||
void init();
|
||||
|
||||
private slots:
|
||||
|
|
@ -145,7 +145,7 @@ class Step2 : public QWidget
|
|||
QButtonGroup *m_optimizeLangGroup = nullptr;
|
||||
QCheckBox *m_crossRef = nullptr;
|
||||
Wizard *m_wizard = nullptr;
|
||||
const QHash<QString,Input *> &m_modelData;
|
||||
const OHash<OString,Input *> &m_modelData;
|
||||
};
|
||||
|
||||
class Step3 : public QWidget
|
||||
|
|
@ -153,7 +153,7 @@ class Step3 : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Step3(Wizard *parent,const QHash<QString,Input*> &modelData);
|
||||
Step3(Wizard *parent,const OHash<OString,Input*> &modelData);
|
||||
void init();
|
||||
|
||||
private slots:
|
||||
|
|
@ -180,9 +180,9 @@ class Step3 : public QWidget
|
|||
QCheckBox *m_xmlEnabled = nullptr;
|
||||
QCheckBox *m_docbookEnabled = nullptr;
|
||||
QCheckBox *m_searchEnabled = nullptr;
|
||||
QPushButton *m_tuneColor = nullptr;
|
||||
OPushButton *m_tuneColor = nullptr;
|
||||
Wizard *m_wizard = nullptr;
|
||||
const QHash<QString,Input *> &m_modelData;
|
||||
const OHash<OString,Input *> &m_modelData;
|
||||
};
|
||||
|
||||
class Step4 : public QWidget
|
||||
|
|
@ -190,7 +190,7 @@ class Step4 : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Step4(Wizard *parent,const QHash<QString,Input*> &modelData);
|
||||
Step4(Wizard *parent,const OHash<OString,Input*> &modelData);
|
||||
void init();
|
||||
|
||||
private slots:
|
||||
|
|
@ -215,21 +215,21 @@ class Step4 : public QWidget
|
|||
QCheckBox *m_dotCall = nullptr;
|
||||
QCheckBox *m_dotCaller = nullptr;
|
||||
Wizard *m_wizard = nullptr;
|
||||
const QHash<QString,Input *> &m_modelData;
|
||||
const OHash<OString,Input *> &m_modelData;
|
||||
};
|
||||
|
||||
class Wizard : public QSplitter
|
||||
class Wizard : public OSplitter
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Wizard(const QHash<QString,Input*> &modelData, QWidget *parent=nullptr);
|
||||
Wizard(const OHash<OString,Input*> &modelData, QWidget *parent=nullptr);
|
||||
~Wizard();
|
||||
|
||||
public slots:
|
||||
void refresh();
|
||||
|
||||
private slots:
|
||||
void activateTopic(QTreeWidgetItem *item,QTreeWidgetItem *);
|
||||
void activateTopic(QGGreeWidgetItem *item,QGGreeWidgetItem *);
|
||||
void nextTopic();
|
||||
void prevTopic();
|
||||
|
||||
|
|
@ -237,15 +237,15 @@ class Wizard : public QSplitter
|
|||
void done();
|
||||
|
||||
private:
|
||||
const QHash<QString,Input *> &m_modelData;
|
||||
QTreeWidget *m_treeWidget = nullptr;
|
||||
QStackedWidget *m_topicStack = nullptr;
|
||||
const OHash<OString,Input *> &m_modelData;
|
||||
QGGreeWidget *m_treeWidget = nullptr;
|
||||
OStackedWidget *m_topicStack = nullptr;
|
||||
Step1 *m_step1 = nullptr;
|
||||
Step2 *m_step2 = nullptr;
|
||||
Step3 *m_step3 = nullptr;
|
||||
Step4 *m_step4 = nullptr;
|
||||
QPushButton *m_next = nullptr;
|
||||
QPushButton *m_prev = nullptr;
|
||||
OPushButton *m_next = nullptr;
|
||||
OPushButton *m_prev = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
Doxmlparser
|
||||
===========
|
||||
|
||||
This is a python package to make it easier to parse the XML output produced by doxygen.
|
||||
This is a python package to make it easier to parse the XML output produced by analyze.
|
||||
|
||||
The API is generated from the index.xsd and compound.xsd XML schema files using
|
||||
Dave Kuhlman's generateDS https://www.davekuhlman.org/generateDS.html
|
||||
|
|
|
|||
|
|
@ -1236,7 +1236,7 @@ class MemberKind(str, Enum):
|
|||
SLOT='slot'
|
||||
|
||||
|
||||
class DoxygenType(GeneratedsSuper):
|
||||
class analyzeType(GeneratedsSuper):
|
||||
__hash__ = GeneratedsSuper.__hash__
|
||||
subclass = None
|
||||
superclass = None
|
||||
|
|
@ -1258,13 +1258,13 @@ class DoxygenType(GeneratedsSuper):
|
|||
def factory(*args_, **kwargs_):
|
||||
if CurrentSubclassModule_ is not None:
|
||||
subclass = getSubclassFromModule_(
|
||||
CurrentSubclassModule_, DoxygenType)
|
||||
CurrentSubclassModule_, analyzeType)
|
||||
if subclass is not None:
|
||||
return subclass(*args_, **kwargs_)
|
||||
if DoxygenType.subclass:
|
||||
return DoxygenType.subclass(*args_, **kwargs_)
|
||||
if analyzeType.subclass:
|
||||
return analyzeType.subclass(*args_, **kwargs_)
|
||||
else:
|
||||
return DoxygenType(*args_, **kwargs_)
|
||||
return analyzeType(*args_, **kwargs_)
|
||||
factory = staticmethod(factory)
|
||||
def get_ns_prefix_(self):
|
||||
return self.ns_prefix_
|
||||
|
|
@ -1306,37 +1306,37 @@ class DoxygenType(GeneratedsSuper):
|
|||
return True
|
||||
else:
|
||||
return False
|
||||
def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DoxygenType', pretty_print=True):
|
||||
imported_ns_def_ = GenerateDSNamespaceDefs_.get('DoxygenType')
|
||||
def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='analyzeType', pretty_print=True):
|
||||
imported_ns_def_ = GenerateDSNamespaceDefs_.get('analyzeType')
|
||||
if imported_ns_def_ is not None:
|
||||
namespacedef_ = imported_ns_def_
|
||||
if pretty_print:
|
||||
eol_ = '\n'
|
||||
else:
|
||||
eol_ = ''
|
||||
if self.original_tagname_ is not None and name_ == 'DoxygenType':
|
||||
if self.original_tagname_ is not None and name_ == 'analyzeType':
|
||||
name_ = self.original_tagname_
|
||||
if UseCapturedNS_ and self.ns_prefix_:
|
||||
namespaceprefix_ = self.ns_prefix_ + ':'
|
||||
showIndent(outfile, level, pretty_print)
|
||||
outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
|
||||
already_processed = set()
|
||||
self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='DoxygenType')
|
||||
self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='analyzeType')
|
||||
if self.hasContent_():
|
||||
outfile.write('>%s' % (eol_, ))
|
||||
self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='DoxygenType', pretty_print=pretty_print)
|
||||
self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='analyzeType', pretty_print=pretty_print)
|
||||
showIndent(outfile, level, pretty_print)
|
||||
outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
|
||||
else:
|
||||
outfile.write('/>%s' % (eol_, ))
|
||||
def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='DoxygenType'):
|
||||
def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='analyzeType'):
|
||||
if self.version is not None and 'version' not in already_processed:
|
||||
already_processed.add('version')
|
||||
outfile.write(' version=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.version), input_name='version')), ))
|
||||
if self.lang is not None and 'lang' not in already_processed:
|
||||
already_processed.add('lang')
|
||||
outfile.write(' xml:lang=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.lang), input_name='lang')), ))
|
||||
def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DoxygenType', fromsubclass_=False, pretty_print=True):
|
||||
def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='analyzeType', fromsubclass_=False, pretty_print=True):
|
||||
if pretty_print:
|
||||
eol_ = '\n'
|
||||
else:
|
||||
|
|
@ -1371,7 +1371,7 @@ class DoxygenType(GeneratedsSuper):
|
|||
obj_.build(child_, gds_collector_=gds_collector_)
|
||||
self.compounddef.append(obj_)
|
||||
obj_.original_tagname_ = 'compounddef'
|
||||
# end class DoxygenType
|
||||
# end class analyzeType
|
||||
|
||||
|
||||
class compounddefType(GeneratedsSuper):
|
||||
|
|
@ -27248,7 +27248,7 @@ class docEmojiType(GeneratedsSuper):
|
|||
|
||||
|
||||
GDSClassesMapping = {
|
||||
'doxygen': DoxygenType,
|
||||
'analyze': analyzeType,
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -27295,8 +27295,8 @@ def parse(inFileName, silence=False, print_warnings=True):
|
|||
rootNode = doc.getroot()
|
||||
rootTag, rootClass = get_root_tag(rootNode)
|
||||
if rootClass is None:
|
||||
rootTag = 'DoxygenType'
|
||||
rootClass = DoxygenType
|
||||
rootTag = 'analyzeType'
|
||||
rootClass = analyzeType
|
||||
rootObj = rootClass.factory()
|
||||
rootObj.build(rootNode, gds_collector_=gds_collector)
|
||||
CapturedNsmap_, namespacedefs = get_required_ns_prefix_defs(rootNode)
|
||||
|
|
@ -27327,8 +27327,8 @@ def parseEtree(inFileName, silence=False, print_warnings=True,
|
|||
rootNode = doc.getroot()
|
||||
rootTag, rootClass = get_root_tag(rootNode)
|
||||
if rootClass is None:
|
||||
rootTag = 'DoxygenType'
|
||||
rootClass = DoxygenType
|
||||
rootTag = 'analyzeType'
|
||||
rootClass = analyzeType
|
||||
rootObj = rootClass.factory()
|
||||
rootObj.build(rootNode, gds_collector_=gds_collector)
|
||||
# Enable Python to collect the space used by the DOM.
|
||||
|
|
@ -27370,8 +27370,8 @@ def parseString(inString, silence=False, print_warnings=True):
|
|||
gds_collector = GdsCollector_()
|
||||
rootTag, rootClass = get_root_tag(rootNode)
|
||||
if rootClass is None:
|
||||
rootTag = 'DoxygenType'
|
||||
rootClass = DoxygenType
|
||||
rootTag = 'analyzeType'
|
||||
rootClass = analyzeType
|
||||
rootObj = rootClass.factory()
|
||||
rootObj.build(rootNode, gds_collector_=gds_collector)
|
||||
if not SaveElementTreeNode:
|
||||
|
|
@ -27398,8 +27398,8 @@ def parseLiteral(inFileName, silence=False, print_warnings=True):
|
|||
rootNode = doc.getroot()
|
||||
rootTag, rootClass = get_root_tag(rootNode)
|
||||
if rootClass is None:
|
||||
rootTag = 'DoxygenType'
|
||||
rootClass = DoxygenType
|
||||
rootTag = 'analyzeType'
|
||||
rootClass = analyzeType
|
||||
rootObj = rootClass.factory()
|
||||
rootObj.build(rootNode, gds_collector_=gds_collector)
|
||||
# Enable Python to collect the space used by the DOM.
|
||||
|
|
@ -27444,7 +27444,7 @@ RenameMappings_ = {
|
|||
NamespaceToDefMappings_ = {'http://www.w3.org/XML/1998/namespace': []}
|
||||
|
||||
__all__ = [
|
||||
"DoxygenType",
|
||||
"analyzeType",
|
||||
"MemberType",
|
||||
"childnodeType",
|
||||
"codelineType",
|
||||
|
|
|
|||
|
|
@ -1004,7 +1004,7 @@ class MemberKind(str, Enum):
|
|||
SLOT='slot'
|
||||
|
||||
|
||||
class DoxygenType(GeneratedsSuper):
|
||||
class analyzeType(GeneratedsSuper):
|
||||
__hash__ = GeneratedsSuper.__hash__
|
||||
subclass = None
|
||||
superclass = None
|
||||
|
|
@ -1026,13 +1026,13 @@ class DoxygenType(GeneratedsSuper):
|
|||
def factory(*args_, **kwargs_):
|
||||
if CurrentSubclassModule_ is not None:
|
||||
subclass = getSubclassFromModule_(
|
||||
CurrentSubclassModule_, DoxygenType)
|
||||
CurrentSubclassModule_, analyzeType)
|
||||
if subclass is not None:
|
||||
return subclass(*args_, **kwargs_)
|
||||
if DoxygenType.subclass:
|
||||
return DoxygenType.subclass(*args_, **kwargs_)
|
||||
if analyzeType.subclass:
|
||||
return analyzeType.subclass(*args_, **kwargs_)
|
||||
else:
|
||||
return DoxygenType(*args_, **kwargs_)
|
||||
return analyzeType(*args_, **kwargs_)
|
||||
factory = staticmethod(factory)
|
||||
def get_ns_prefix_(self):
|
||||
return self.ns_prefix_
|
||||
|
|
@ -1063,37 +1063,37 @@ class DoxygenType(GeneratedsSuper):
|
|||
return True
|
||||
else:
|
||||
return False
|
||||
def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DoxygenType', pretty_print=True):
|
||||
imported_ns_def_ = GenerateDSNamespaceDefs_.get('DoxygenType')
|
||||
def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='analyzeType', pretty_print=True):
|
||||
imported_ns_def_ = GenerateDSNamespaceDefs_.get('analyzeType')
|
||||
if imported_ns_def_ is not None:
|
||||
namespacedef_ = imported_ns_def_
|
||||
if pretty_print:
|
||||
eol_ = '\n'
|
||||
else:
|
||||
eol_ = ''
|
||||
if self.original_tagname_ is not None and name_ == 'DoxygenType':
|
||||
if self.original_tagname_ is not None and name_ == 'analyzeType':
|
||||
name_ = self.original_tagname_
|
||||
if UseCapturedNS_ and self.ns_prefix_:
|
||||
namespaceprefix_ = self.ns_prefix_ + ':'
|
||||
showIndent(outfile, level, pretty_print)
|
||||
outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
|
||||
already_processed = set()
|
||||
self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='DoxygenType')
|
||||
self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='analyzeType')
|
||||
if self.hasContent_():
|
||||
outfile.write('>%s' % (eol_, ))
|
||||
self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='DoxygenType', pretty_print=pretty_print)
|
||||
self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='analyzeType', pretty_print=pretty_print)
|
||||
showIndent(outfile, level, pretty_print)
|
||||
outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
|
||||
else:
|
||||
outfile.write('/>%s' % (eol_, ))
|
||||
def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='DoxygenType'):
|
||||
def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='analyzeType'):
|
||||
if self.version is not None and 'version' not in already_processed:
|
||||
already_processed.add('version')
|
||||
outfile.write(' version=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.version), input_name='version')), ))
|
||||
if self.lang is not None and 'lang' not in already_processed:
|
||||
already_processed.add('lang')
|
||||
outfile.write(' xml:lang=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.lang), input_name='lang')), ))
|
||||
def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DoxygenType', fromsubclass_=False, pretty_print=True):
|
||||
def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='analyzeType', fromsubclass_=False, pretty_print=True):
|
||||
if pretty_print:
|
||||
eol_ = '\n'
|
||||
else:
|
||||
|
|
@ -1127,7 +1127,7 @@ class DoxygenType(GeneratedsSuper):
|
|||
obj_.build(child_, gds_collector_=gds_collector_)
|
||||
self.compound.append(obj_)
|
||||
obj_.original_tagname_ = 'compound'
|
||||
# end class DoxygenType
|
||||
# end class analyzeType
|
||||
|
||||
|
||||
class CompoundType(GeneratedsSuper):
|
||||
|
|
@ -1421,7 +1421,7 @@ class MemberType(GeneratedsSuper):
|
|||
|
||||
|
||||
GDSClassesMapping = {
|
||||
'doxygenindex': DoxygenType,
|
||||
'analyzeindex': analyzeType,
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1468,8 +1468,8 @@ def parse(inFileName, silence=False, print_warnings=True):
|
|||
rootNode = doc.getroot()
|
||||
rootTag, rootClass = get_root_tag(rootNode)
|
||||
if rootClass is None:
|
||||
rootTag = 'DoxygenType'
|
||||
rootClass = DoxygenType
|
||||
rootTag = 'analyzeType'
|
||||
rootClass = analyzeType
|
||||
rootObj = rootClass.factory()
|
||||
rootObj.build(rootNode, gds_collector_=gds_collector)
|
||||
CapturedNsmap_, namespacedefs = get_required_ns_prefix_defs(rootNode)
|
||||
|
|
@ -1500,8 +1500,8 @@ def parseEtree(inFileName, silence=False, print_warnings=True,
|
|||
rootNode = doc.getroot()
|
||||
rootTag, rootClass = get_root_tag(rootNode)
|
||||
if rootClass is None:
|
||||
rootTag = 'DoxygenType'
|
||||
rootClass = DoxygenType
|
||||
rootTag = 'analyzeType'
|
||||
rootClass = analyzeType
|
||||
rootObj = rootClass.factory()
|
||||
rootObj.build(rootNode, gds_collector_=gds_collector)
|
||||
# Enable Python to collect the space used by the DOM.
|
||||
|
|
@ -1543,8 +1543,8 @@ def parseString(inString, silence=False, print_warnings=True):
|
|||
gds_collector = GdsCollector_()
|
||||
rootTag, rootClass = get_root_tag(rootNode)
|
||||
if rootClass is None:
|
||||
rootTag = 'DoxygenType'
|
||||
rootClass = DoxygenType
|
||||
rootTag = 'analyzeType'
|
||||
rootClass = analyzeType
|
||||
rootObj = rootClass.factory()
|
||||
rootObj.build(rootNode, gds_collector_=gds_collector)
|
||||
if not SaveElementTreeNode:
|
||||
|
|
@ -1571,8 +1571,8 @@ def parseLiteral(inFileName, silence=False, print_warnings=True):
|
|||
rootNode = doc.getroot()
|
||||
rootTag, rootClass = get_root_tag(rootNode)
|
||||
if rootClass is None:
|
||||
rootTag = 'DoxygenType'
|
||||
rootClass = DoxygenType
|
||||
rootTag = 'analyzeType'
|
||||
rootClass = analyzeType
|
||||
rootObj = rootClass.factory()
|
||||
rootObj.build(rootNode, gds_collector_=gds_collector)
|
||||
# Enable Python to collect the space used by the DOM.
|
||||
|
|
@ -1618,6 +1618,6 @@ NamespaceToDefMappings_ = {'http://www.w3.org/XML/1998/namespace': []}
|
|||
|
||||
__all__ = [
|
||||
"CompoundType",
|
||||
"DoxygenType",
|
||||
"analyzeType",
|
||||
"MemberType"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# An minimal example showing how to use the python doxmlparser module to read
|
||||
# the XML output generated by doxygen for a project and dump it to the output again.
|
||||
# the XML output generated by analyze for a project and dump it to the output again.
|
||||
|
||||
import sys
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# An example showing how to use the python doxmlparser module to extract some metrics from
|
||||
# the XML output generated by doxygen for a project.
|
||||
# the XML output generated by analyze for a project.
|
||||
|
||||
import sys
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
# for any purpose. It is provided "as is" without express or implied warranty.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# Documents produced by Doxygen are derivative works derived from the
|
||||
# Documents produced by analyze are derivative works derived from the
|
||||
# input used in their production; they are not affected by this license.
|
||||
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ with open('requirements.txt') as f:
|
|||
setup(
|
||||
name='doxmlparser',
|
||||
version=version,
|
||||
description='Python API to access doxygen generated XML output',
|
||||
description='Python API to access analyze generated XML output',
|
||||
long_description=readme,
|
||||
author='Dimitri van Heesch',
|
||||
author_email='doxygen@gmail.com',
|
||||
url='https://github.com/doxygen/doxygen/addon/doxmlparser',
|
||||
author_email='analyze@gmail.com',
|
||||
url='https://github.com/analyze/analyze/addon/doxmlparser',
|
||||
license=license,
|
||||
packages=find_packages(exclude=('tests', 'docs')),
|
||||
install_requires=requirements
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
.TH DOXYPARSE "1" "DATE" "doxyparse VERSION" "User Commands"
|
||||
.SH NAME
|
||||
doxyparse \- parse and dumps information about the code
|
||||
.SH SYNOPSIS
|
||||
.B doxyparse
|
||||
[\fIsource file\fR...]
|
||||
.SH DESCRIPTION
|
||||
Parses source code and dumps the dependencies between the code elements.
|
||||
.SH SEE ALSO
|
||||
doxygen(1), doxytag(1), doxywizard(1).
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
Doxywizard is a graphical front-end to read/edit/write doxygen configuration
|
||||
files and to launch doxygen. It requires Qt version 4.3 or higher.
|
||||
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1997-2022 by Dimitri van Heesch.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation under the terms of the GNU General Public License is hereby
|
||||
* granted. No representations are made about the suitability of this software
|
||||
* for any purpose. It is provided "as is" without express or implied warranty.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ADAPTER_H
|
||||
#define ADAPTER_H
|
||||
|
||||
#include <memory>
|
||||
#include <QtGlobal>
|
||||
#include <QString>
|
||||
#include <QTextStream>
|
||||
#include <QPointF>
|
||||
#include <QMouseEvent>
|
||||
|
||||
/** @file
|
||||
* @brief compatibility adapters for Qt5/Qt6 support.
|
||||
*/
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QTextCodec>
|
||||
class TextCodecAdapter
|
||||
{
|
||||
public:
|
||||
TextCodecAdapter(const QByteArray &name)
|
||||
{
|
||||
m_codec = QTextCodec::codecForName(name);
|
||||
if (m_codec==nullptr) // fallback: use UTF-8
|
||||
{
|
||||
m_codec = QTextCodec::codecForName("UTF-8");
|
||||
}
|
||||
}
|
||||
QByteArray encode(const QString &input) { return m_codec ? m_codec->fromUnicode(input) : input.toLatin1(); }
|
||||
QString decode(const QByteArray &input) { return m_codec ? m_codec->toUnicode(input) : QString::fromLatin1(input); }
|
||||
void applyToStream(QTextStream &t) { t.setCodec(m_codec); }
|
||||
bool isValid() const { return m_codec!=nullptr; }
|
||||
private:
|
||||
QTextCodec *m_codec = nullptr; // object is owned by Qt
|
||||
};
|
||||
#else // Qt6+
|
||||
#include <QStringEncoder>
|
||||
#include <QStringDecoder>
|
||||
#include <QStringConverter>
|
||||
class TextCodecAdapter
|
||||
{
|
||||
public:
|
||||
TextCodecAdapter(const QByteArray &name)
|
||||
{
|
||||
auto encodingOpt = QStringConverter::encodingForName(name);
|
||||
if (encodingOpt)
|
||||
{
|
||||
m_encoding = *encodingOpt;
|
||||
}
|
||||
m_encoder = std::make_unique<QStringEncoder>(m_encoding);
|
||||
m_decoder = std::make_unique<QStringDecoder>(m_encoding);
|
||||
}
|
||||
QByteArray encode(const QString &input) { return m_encoder ? m_encoder->encode(input) : input.toLatin1(); }
|
||||
QString decode(const QByteArray &input) { return m_decoder ? m_decoder->decode(input) : QString::fromLatin1(input); }
|
||||
void applyToStream(QTextStream &t) { t.setEncoding(m_encoding); }
|
||||
bool isValid() const { return m_decoder!=0; }
|
||||
private:
|
||||
std::unique_ptr<QStringEncoder> m_encoder;
|
||||
std::unique_ptr<QStringDecoder> m_decoder;
|
||||
QStringConverter::Encoding m_encoding = QStringConverter::Utf8;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
inline qreal getMouseYPositionFromEvent(QMouseEvent *m)
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
return m->y();
|
||||
#else
|
||||
return m->position().y();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
#include <QString>
|
||||
#include "config_msg.h"
|
||||
#include "doxywizard.h"
|
||||
|
||||
static QString warning_str = QString::fromLatin1("warning: ");
|
||||
static QString error_str = QString::fromLatin1("error: ");
|
||||
|
||||
void config_err(const char *fmt, ...)
|
||||
{
|
||||
QString msg = error_str;
|
||||
|
||||
msg.append(QString::fromLatin1(fmt));
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char debugOut[1000]; // this size should be sufficient
|
||||
vsnprintf(debugOut, 1000,qPrintable(msg), args);
|
||||
MainWindow::instance().outputLogText(QString::fromLatin1(debugOut));
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void config_term(const char *fmt, ...)
|
||||
{
|
||||
QString msg = error_str;
|
||||
|
||||
msg.append(QString::fromLatin1(fmt));
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char debugOut[1000]; // this size should be sufficient
|
||||
vsnprintf(debugOut, 1000,qPrintable(msg), args);
|
||||
MainWindow::instance().outputLogText(QString::fromLatin1(debugOut));
|
||||
va_end(args);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void config_warn(const char *fmt, ...)
|
||||
{
|
||||
QString msg = warning_str;
|
||||
|
||||
msg.append(QString::fromLatin1(fmt));
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char debugOut[1000];
|
||||
vsnprintf(debugOut, 1000,qPrintable(msg), args);
|
||||
MainWindow::instance().outputLogText(QString::fromLatin1(debugOut));
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void config_open()
|
||||
{
|
||||
MainWindow::instance().outputLogStart();
|
||||
}
|
||||
|
||||
void config_finish()
|
||||
{
|
||||
MainWindow::instance().outputLogFinish();
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ if(enable_coverage)
|
|||
-P ${PROJECT_SOURCE_DIR}/cmake/SearchReplace.cmake
|
||||
COMMAND ${GENHTML_PATH} --rc genhtml_branch_coverage=1
|
||||
--function-coverage --branch-coverage
|
||||
--title "Doxygen Coverage Report" --num-spaces 2
|
||||
--title "analyze Coverage Report" --num-spaces 2
|
||||
--legend --prefix ${PROJECT_SOURCE_DIR} --demangle-cpp
|
||||
--output-directory cov_output cov.info.final
|
||||
COMMAND ${CMAKE_COMMAND} -E remove cov.info cov.info.cleaned cov.info.final
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
# analyze_version.cmake
|
||||
#
|
||||
|
||||
# This file defines the functions and targets needed to monitor
|
||||
# analyze VERSION file.
|
||||
#
|
||||
# The behavior of this script can be modified by defining any of these variables:
|
||||
#
|
||||
# PRE_CONFIGURE_analyze_VERSION_FILE (REQUIRED)
|
||||
# -- The path to the file that'll be configured.
|
||||
#
|
||||
# POST_CONFIGURE_analyze_VERSION_FILE (REQUIRED)
|
||||
# -- The path to the configured PRE_CONFIGURE_analyze_VERSION_FILE.
|
||||
#
|
||||
# analz_STATE_FILE (OPTIONAL)
|
||||
# -- The path to the file used to store the analyze version information.
|
||||
#
|
||||
# This file is based on git_watcher.cmake
|
||||
|
||||
# Short hand for converting paths to absolute.
|
||||
macro(PATH_TO_ABSOLUTE var_name)
|
||||
get_filename_component(${var_name} "${${var_name}}" ABSOLUTE)
|
||||
endmacro()
|
||||
|
||||
# Check that a required variable is set.
|
||||
macro(CHECK_REQUIRED_VARIABLE var_name)
|
||||
if(NOT DEFINED ${var_name})
|
||||
message(FATAL_ERROR "The \"${var_name}\" variable must be defined.")
|
||||
endif()
|
||||
PATH_TO_ABSOLUTE(${var_name})
|
||||
endmacro()
|
||||
|
||||
# Check that an optional variable is set, or, set it to a default value.
|
||||
macro(CHECK_OPTIONAL_VARIABLE var_name default_value)
|
||||
if(NOT DEFINED ${var_name})
|
||||
set(${var_name} ${default_value})
|
||||
endif()
|
||||
PATH_TO_ABSOLUTE(${var_name})
|
||||
endmacro()
|
||||
|
||||
CHECK_REQUIRED_VARIABLE(PRE_CONFIGURE_analyze_VERSION_FILE)
|
||||
CHECK_REQUIRED_VARIABLE(POST_CONFIGURE_analyze_VERSION_FILE)
|
||||
CHECK_OPTIONAL_VARIABLE(analz_STATE_FILE "${PROJECT_SOURCE_DIR}/VERSION")
|
||||
|
||||
# Function: analyzeStateChangedAction
|
||||
# Description: this function is executed when the
|
||||
# analyze version file has changed.
|
||||
function(analyzeStateChangedAction _state_as_list)
|
||||
# Set variables by index, then configure the file w/ these variables defined.
|
||||
LIST(GET _state_as_list 0 analyze_VERSION)
|
||||
configure_file("${PRE_CONFIGURE_analyze_VERSION_FILE}" "${POST_CONFIGURE_analyze_VERSION_FILE}" @ONLY)
|
||||
endfunction()
|
||||
|
||||
|
||||
|
||||
# Function: SetupanalzMonitoring
|
||||
# Description: this function sets up custom commands that make the build system
|
||||
# check the analyze version file before every build. If it has
|
||||
# changed, then a file is configured.
|
||||
function(SetupanalzMonitoring)
|
||||
add_custom_target(check_analyze_version
|
||||
ALL
|
||||
DEPENDS ${PRE_CONFIGURE_analyze_VERSION_FILE}
|
||||
BYPRODUCTS ${POST_CONFIGURE_analyze_VERSION_FILE}
|
||||
COMMENT "Checking the analyze version for changes..."
|
||||
COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
-D_BUILD_TIME_CHECK_analz=TRUE
|
||||
-Danalz_STATE_FILE=${analz_STATE_FILE}
|
||||
-DPRE_CONFIGURE_analyze_VERSION_FILE=${PRE_CONFIGURE_analyze_VERSION_FILE}
|
||||
-DPOST_CONFIGURE_analyze_VERSION_FILE=${POST_CONFIGURE_analyze_VERSION_FILE}
|
||||
-P "${CMAKE_CURRENT_LIST_FILE}")
|
||||
endfunction()
|
||||
|
||||
|
||||
|
||||
# Function: Main
|
||||
# Description: primary entry-point to the script. Functions are selected based
|
||||
# on whether it's configure or build time.
|
||||
function(Main)
|
||||
file(STRINGS "${analz_STATE_FILE}" analyze_VERSION)
|
||||
if(_BUILD_TIME_CHECK_analz)
|
||||
# Check if the analyze version file has changed.
|
||||
# If so, run the change action.
|
||||
if(${analz_STATE_FILE} IS_NEWER_THAN ${POST_CONFIGURE_analyze_VERSION_FILE})
|
||||
analyzeStateChangedAction("${analyze_VERSION}")
|
||||
endif()
|
||||
else()
|
||||
# >> Executes at configure time.
|
||||
SetupanalzMonitoring()
|
||||
analyzeStateChangedAction("${analyze_VERSION}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# And off we go...
|
||||
Main()
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
# doxygen_version.cmake
|
||||
#
|
||||
|
||||
# This file defines the functions and targets needed to monitor
|
||||
# doxygen VERSION file.
|
||||
#
|
||||
# The behavior of this script can be modified by defining any of these variables:
|
||||
#
|
||||
# PRE_CONFIGURE_DOXYGEN_VERSION_FILE (REQUIRED)
|
||||
# -- The path to the file that'll be configured.
|
||||
#
|
||||
# POST_CONFIGURE_DOXYGEN_VERSION_FILE (REQUIRED)
|
||||
# -- The path to the configured PRE_CONFIGURE_DOXYGEN_VERSION_FILE.
|
||||
#
|
||||
# DOXY_STATE_FILE (OPTIONAL)
|
||||
# -- The path to the file used to store the doxygen version information.
|
||||
#
|
||||
# This file is based on git_watcher.cmake
|
||||
|
||||
# Short hand for converting paths to absolute.
|
||||
macro(PATH_TO_ABSOLUTE var_name)
|
||||
get_filename_component(${var_name} "${${var_name}}" ABSOLUTE)
|
||||
endmacro()
|
||||
|
||||
# Check that a required variable is set.
|
||||
macro(CHECK_REQUIRED_VARIABLE var_name)
|
||||
if(NOT DEFINED ${var_name})
|
||||
message(FATAL_ERROR "The \"${var_name}\" variable must be defined.")
|
||||
endif()
|
||||
PATH_TO_ABSOLUTE(${var_name})
|
||||
endmacro()
|
||||
|
||||
# Check that an optional variable is set, or, set it to a default value.
|
||||
macro(CHECK_OPTIONAL_VARIABLE var_name default_value)
|
||||
if(NOT DEFINED ${var_name})
|
||||
set(${var_name} ${default_value})
|
||||
endif()
|
||||
PATH_TO_ABSOLUTE(${var_name})
|
||||
endmacro()
|
||||
|
||||
CHECK_REQUIRED_VARIABLE(PRE_CONFIGURE_DOXYGEN_VERSION_FILE)
|
||||
CHECK_REQUIRED_VARIABLE(POST_CONFIGURE_DOXYGEN_VERSION_FILE)
|
||||
CHECK_OPTIONAL_VARIABLE(DOXY_STATE_FILE "${PROJECT_SOURCE_DIR}/VERSION")
|
||||
|
||||
# Function: DoxygenStateChangedAction
|
||||
# Description: this function is executed when the
|
||||
# doxygen version file has changed.
|
||||
function(DoxygenStateChangedAction _state_as_list)
|
||||
# Set variables by index, then configure the file w/ these variables defined.
|
||||
LIST(GET _state_as_list 0 DOXYGEN_VERSION)
|
||||
configure_file("${PRE_CONFIGURE_DOXYGEN_VERSION_FILE}" "${POST_CONFIGURE_DOXYGEN_VERSION_FILE}" @ONLY)
|
||||
endfunction()
|
||||
|
||||
|
||||
|
||||
# Function: SetupDoxyMonitoring
|
||||
# Description: this function sets up custom commands that make the build system
|
||||
# check the doxygen version file before every build. If it has
|
||||
# changed, then a file is configured.
|
||||
function(SetupDoxyMonitoring)
|
||||
add_custom_target(check_doxygen_version
|
||||
ALL
|
||||
DEPENDS ${PRE_CONFIGURE_DOXYGEN_VERSION_FILE}
|
||||
BYPRODUCTS ${POST_CONFIGURE_DOXYGEN_VERSION_FILE}
|
||||
COMMENT "Checking the doxygen version for changes..."
|
||||
COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
-D_BUILD_TIME_CHECK_DOXY=TRUE
|
||||
-DDOXY_STATE_FILE=${DOXY_STATE_FILE}
|
||||
-DPRE_CONFIGURE_DOXYGEN_VERSION_FILE=${PRE_CONFIGURE_DOXYGEN_VERSION_FILE}
|
||||
-DPOST_CONFIGURE_DOXYGEN_VERSION_FILE=${POST_CONFIGURE_DOXYGEN_VERSION_FILE}
|
||||
-P "${CMAKE_CURRENT_LIST_FILE}")
|
||||
endfunction()
|
||||
|
||||
|
||||
|
||||
# Function: Main
|
||||
# Description: primary entry-point to the script. Functions are selected based
|
||||
# on whether it's configure or build time.
|
||||
function(Main)
|
||||
file(STRINGS "${DOXY_STATE_FILE}" DOXYGEN_VERSION)
|
||||
if(_BUILD_TIME_CHECK_DOXY)
|
||||
# Check if the doxygen version file has changed.
|
||||
# If so, run the change action.
|
||||
if(${DOXY_STATE_FILE} IS_NEWER_THAN ${POST_CONFIGURE_DOXYGEN_VERSION_FILE})
|
||||
DoxygenStateChangedAction("${DOXYGEN_VERSION}")
|
||||
endif()
|
||||
else()
|
||||
# >> Executes at configure time.
|
||||
SetupDoxyMonitoring()
|
||||
DoxygenStateChangedAction("${DOXYGEN_VERSION}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# And off we go...
|
||||
Main()
|
||||
|
|
@ -6,9 +6,9 @@
|
|||
# - https://sourceforge.net/p/klusters/klusters/ci/master/tree/CMakeLists.txt
|
||||
#
|
||||
# This cmake script should generate same packages (deb,rpm) as:
|
||||
# - https://mirror.debian.ikoula.com/debian/pool/main/d/doxygen
|
||||
# - http://archive.ubuntu.com/ubuntu/pool/main/d/doxygen (http://old-releases.ubuntu.com/ubuntu/pool/main/d/doxygen)
|
||||
# - https://rpmfind.net/linux/rpm2html/search.php?query=doxygen
|
||||
# - https://mirror.debian.ikoula.com/debian/pool/main/d/analyze
|
||||
# - http://archive.ubuntu.com/ubuntu/pool/main/d/analyze (http://old-releases.ubuntu.com/ubuntu/pool/main/d/analyze)
|
||||
# - https://rpmfind.net/linux/rpm2html/search.php?query=analyze
|
||||
|
||||
set(CPACK_STRIP_FILES ON)
|
||||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME} )
|
||||
|
|
@ -16,10 +16,10 @@ set(CPACK_PACKAGE_VERSION ${VERSION})
|
|||
set(CPACK_PACKAGE_CONTACT "Dimitri van Heesch")
|
||||
set(CPACK_PACKAGE_VENDOR "Dimitri van Heesch")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Generate documentation from C, C++, Java, Python and other languages")
|
||||
set(CPACK_PACKAGE_DESCRIPTION "Doxygen is the de facto standard tool for generating documentation from annotated C++ sources.
|
||||
set(CPACK_PACKAGE_DESCRIPTION "analyze is the de facto standard tool for generating documentation from annotated C++ sources.
|
||||
But many other popular programming languages are supported:
|
||||
C, Objective-C, C#, PHP, Java, Python, Fortran, D (some extent), and IDL (Corba, Microsoft, and UNO/OpenOffice flavors).
|
||||
Doxygen also supports the hardware description language VHDL.
|
||||
analyze also supports the hardware description language VHDL.
|
||||
.
|
||||
Three usages:
|
||||
.
|
||||
|
|
@ -31,9 +31,9 @@ set(CPACK_PACKAGE_DESCRIPTION "Doxygen is the de facto standard tool for generat
|
|||
Also generate include dependency graphs, inheritance diagrams, and collaboration diagrams.
|
||||
Useful to quickly understand code organization in large source distributions.
|
||||
.
|
||||
3. Create normal documentation (as the doxygen user manual and web-site http://doxygen.org/)
|
||||
3. Create normal documentation (as the analyze user manual and web-site http://analyze.org/)
|
||||
.
|
||||
Install the doxygen-latex package to build LaTeX based documents.
|
||||
Install the analyze-latex package to build LaTeX based documents.
|
||||
Install the libclang1 package to use the 'clang assisted parsing'.")
|
||||
|
||||
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
|
||||
|
|
@ -43,28 +43,28 @@ set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
|
|||
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||
set(CPACK_RPM_PACKAGE_GROUP "Development/Tools")
|
||||
set(CPACK_RPM_PACKAGE_URL "https://doxygen.org/")
|
||||
set(CPACK_RPM_PACKAGE_URL "https://analyze.org/")
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "/sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv, libstdc++ >= 2.96")
|
||||
set(CPACK_RPM_PACKAGE_SUGGESTS "doxygen-latex, doxygen-doc, doxygen-gui, graphviz, libclang1")
|
||||
set(CPACK_RPM_PACKAGE_SUGGESTS "analyze-latex, analyze-doc, analyze-gui, graphviz, libclang1")
|
||||
|
||||
# Variables specific to CPack DEB generator
|
||||
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
|
||||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://doxygen.org/")
|
||||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://analyze.org/")
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS YES) #set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libclang1-3.6, libgcc1, libstdc++6, libxapian22")
|
||||
set(CPACK_DEBIAN_PACKAGE_SUGGESTS "doxygen-latex, doxygen-doc, doxygen-gui, graphviz, libclang1")
|
||||
set(CPACK_DEBIAN_PACKAGE_SUGGESTS "analyze-latex, analyze-doc, analyze-gui, graphviz, libclang1")
|
||||
set(CPACK_DEBIAN_PACKAGE_CONFLICTS "graphviz (<< 1.12)")
|
||||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Matthias Klose <doko@debian.org>") # Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
|
||||
|
||||
# Variables specific to CPack NSIS generator
|
||||
set(CPACK_NSIS_MUI_ICON ${CMAKE_CURRENT_SOURCE_DIR}/addon/doxywizard/doxywizard.ico)
|
||||
set(CPACK_NSIS_URL_INFO_ABOUT "https://doxygen.org/")
|
||||
set(CPACK_NSIS_MUI_ICON ${CMAKE_CURRENT_SOURCE_DIR}/addon/analzwizard/analzwizard.ico)
|
||||
set(CPACK_NSIS_URL_INFO_ABOUT "https://analyze.org/")
|
||||
set(CPACK_NSIS_PACKAGE_NAME ${PROJECT_NAME})
|
||||
|
||||
# Variables specific to CPack DragNDrop generator
|
||||
set(CPACK_DMG_FORMAT "UDBZ") # UDRO=UDIF-Read-Only, UDZO=zlib, UDBZ=bzip2 -- See hdiutil
|
||||
set(CPACK_DMG_VOLUME_NAME ${PROJECT_NAME})
|
||||
set(CPACK_DMG_BACKGROUND_IMAGE ${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen_logo.eps)
|
||||
set(CPACK_DMG_BACKGROUND_IMAGE ${CMAKE_CURRENT_SOURCE_DIR}/doc/analyze_logo.eps)
|
||||
|
||||
if(WIN32)
|
||||
set(CPACK_GENERATOR "ZIP;NSIS")
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ struct DeflateTrackBothSize: public DeflateTrackTagBase{};
|
|||
|
||||
|
||||
/// The rest of the file is just for the curious about implementation.
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
#ifndef analyze_SHOULD_SKIP_THIS
|
||||
namespace gunzip_ns
|
||||
{
|
||||
//#define DO_DEFDB_DUMPING
|
||||
|
|
@ -252,7 +252,7 @@ namespace gunzip_ns
|
|||
RandomAccessBitArray<Dim*Elem> impl;
|
||||
inline std::uint_fast64_t Get(unsigned index) const { return impl.template Get<Elem>(index); }
|
||||
inline void Set(unsigned index, std::uint_fast32_t value) { impl.template Set<Elem,true>(index, value); }
|
||||
inline void QSet(unsigned index, std::uint_fast32_t value) { impl.template Set<Elem,false>(index, value); }
|
||||
inline void OSet(unsigned index, std::uint_fast32_t value) { impl.template Set<Elem,false>(index, value); }
|
||||
template<unsigned Bits>
|
||||
inline void WSet(unsigned index, std::uint_fast64_t value) { impl.template Set<Bits,true>(index, value); }
|
||||
};
|
||||
|
|
@ -264,13 +264,13 @@ namespace gunzip_ns
|
|||
E data[Dim];
|
||||
inline E Get(unsigned index) const { return data[index]; }
|
||||
inline void Set(unsigned index, E value) { data[index] = value; }
|
||||
inline void QSet(unsigned index, E value) { data[index] = value; }
|
||||
inline void OSet(unsigned index, E value) { data[index] = value; }
|
||||
template<unsigned Bits>
|
||||
inline void WSet(unsigned index, std::uint_fast64_t value)
|
||||
{
|
||||
index *= Bits/Elem;
|
||||
for(unsigned b=0; b<Bits; b+=Elem, value>>=Elem)
|
||||
QSet(index++, (value % (1u << Elem)));
|
||||
OSet(index++, (value % (1u << Elem)));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -333,7 +333,7 @@ namespace gunzip_ns
|
|||
// Compute offset table for distribution sort
|
||||
for(unsigned sum=0, a = 1; a < 16; ++a)
|
||||
{
|
||||
offs.QSet(a-1, sum); // starting offset for values that have length "a"
|
||||
offs.OSet(a-1, sum); // starting offset for values that have length "a"
|
||||
sum += tree.Get(0 + a-1); // number of values that have length "a"
|
||||
}
|
||||
#ifdef DEFL_DO_HUFF_STATS
|
||||
|
|
@ -798,7 +798,7 @@ namespace gunzip_ns
|
|||
#endif
|
||||
|
||||
--num;
|
||||
Lengths.QSet(code++, lencode & 0xF);
|
||||
Lengths.OSet(code++, lencode & 0xF);
|
||||
if(code == length) { goto done; }
|
||||
} while(num > 0);
|
||||
}
|
||||
|
|
@ -1427,4 +1427,4 @@ auto Deflate(T&&... args)
|
|||
return gunzip_ns::DeflateInputDispatch<0>(gunzip_ns::dummy{}, std::forward<T>(args)...);
|
||||
}
|
||||
|
||||
#endif /* #ifndef DOXYGEN_SHOULD_SKIP_THIS */
|
||||
#endif /* #ifndef analyze_SHOULD_SKIP_THIS */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Doxygen's jquery.js script is composed of minified versions of the following
|
||||
analyze's jquery.js script is composed of minified versions of the following
|
||||
packages:
|
||||
- jquery 3.6.0: https://jquery.com/download/
|
||||
- jquery.ui 1.13.2: https://github.com/jquery/jquery-ui
|
||||
|
|
@ -11,10 +11,10 @@ packages:
|
|||
- jquery.touchpunch: 0.2.3: http://touchpunch.furf.com/ + fix for issue 303
|
||||
- jquery.smartmenus: 1.1.0: https://www.smartmenus.org/
|
||||
|
||||
The Makefile will built the jquery.js files used by doxygen.
|
||||
The Makefile will built the jquery.js files used by analyze.
|
||||
|
||||
Note that there is a performance issue in the default powertip version.
|
||||
See https://github.com/stevenbenner/jquery-powertip/issues/178
|
||||
Until that is fixed a modified version is shipped with doxygen. This version
|
||||
removes the "destroy" functionality which was not used by doxygen anyway.
|
||||
Until that is fixed a modified version is shipped with analyze. This version
|
||||
removes the "destroy" functionality which was not used by analyze anyway.
|
||||
|
||||
|
|
|
|||
|
|
@ -711,7 +711,7 @@ static unsigned encodeLZ77_brute(uivector* out, const unsigned char* in, size_t
|
|||
/*using pointer instead of vector for input makes it faster when NOT using optimization when compiling; no influence if optimization is used*/
|
||||
for(pos = 0; pos < size; pos++)
|
||||
{
|
||||
/*Phase 1: doxygen images often have long runs of the same color, try to find them*/
|
||||
/*Phase 1: analyze images often have long runs of the same color, try to find them*/
|
||||
const int minLength = 4; // Minimum length for a run to make sense
|
||||
|
||||
if(pos < size - minLength * 4)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
Issue 6880 (https://github.com/doxygen/doxygen/issues/6880) required fixes to the mscgen tool.
|
||||
Since this tool is no longer maintained, it was decided to build mscgen as part of doxygen.
|
||||
Issue 6880 (https://github.com/analyze/analyze/issues/6880) required fixes to the mscgen tool.
|
||||
Since this tool is no longer maintained, it was decided to build mscgen as part of analyze.
|
||||
This directory contains the mscgen code.
|
||||
|
||||
Since mscgen depends on libgd for PNG output, a part of the gd library is included as well.
|
||||
Instead of using libpng as PNG generator, the lodepng library is used. This PNG library was
|
||||
already part of doxygen. Module gd_lodepng.c was added to make libgd use lodepng.
|
||||
already part of analyze. Module gd_lodepng.c was added to make libgd use lodepng.
|
||||
|
||||
Original copyright statement follows:
|
||||
|
||||
|
|
|
|||
|
|
@ -1079,7 +1079,7 @@ BGD_DECLARE(int) gdImageColorReplaceArray (gdImagePtr im, int len, int *src, int
|
|||
base[(i<<1)] = src[i];
|
||||
base[(i<<1)+1] = dst[i];
|
||||
}
|
||||
qsort(base, len, sizeof(int)<<1, colorCmp);
|
||||
OSort(base, len, sizeof(int)<<1, colorCmp);
|
||||
|
||||
#define REPLACING_LOOP(pixel) do { \
|
||||
for (y = im->cy1; y <= im->cy2; y++) { \
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
know about them. */
|
||||
enum yytokentype {
|
||||
TOK_STRING = 258,
|
||||
TOK_QSTRING = 259,
|
||||
TOK_OSTRING = 259,
|
||||
TOK_EQUAL = 260,
|
||||
TOK_COMMA = 261,
|
||||
TOK_SEMICOLON = 262,
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
#endif
|
||||
/* Tokens. */
|
||||
#define TOK_STRING 258
|
||||
#define TOK_QSTRING 259
|
||||
#define TOK_OSTRING 259
|
||||
#define TOK_EQUAL 260
|
||||
#define TOK_COMMA 261
|
||||
#define TOK_SEMICOLON 262
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ void yyerror(void *unused, const char *str)
|
|||
"TOK_ATTR_IDURL", "TOK_ATTR_ID",
|
||||
"TOK_ATTR_LINE_COLOUR", "TOK_ATTR_TEXT_COLOUR",
|
||||
"TOK_SPECIAL_ARC", "TOK_UNKNOWN",
|
||||
"TOK_STRING", "TOK_QSTRING",
|
||||
"TOK_STRING", "TOK_OSTRING",
|
||||
"TOK_OPT_HSCALE", "TOK_ASTERISK",
|
||||
"TOK_OPT_WIDTH", "TOK_ARC_BOX",
|
||||
"TOK_ARC_ABOX", "TOK_ARC_RBOX",
|
||||
|
|
@ -227,7 +227,7 @@ Msc MscParse(FILE *in)
|
|||
|
||||
%parse-param {void *YYPARSE_PARAM}
|
||||
|
||||
%token TOK_STRING TOK_QSTRING TOK_EQUAL TOK_COMMA TOK_SEMICOLON TOK_OCBRACKET TOK_CCBRACKET
|
||||
%token TOK_STRING TOK_OSTRING TOK_EQUAL TOK_COMMA TOK_SEMICOLON TOK_OCBRACKET TOK_CCBRACKET
|
||||
TOK_OSBRACKET TOK_CSBRACKET TOK_MSC
|
||||
TOK_ATTR_LABEL TOK_ATTR_URL TOK_ATTR_ID TOK_ATTR_IDURL
|
||||
TOK_ATTR_LINE_COLOUR TOK_ATTR_TEXT_COLOUR TOK_ATTR_TEXT_BGCOLOUR
|
||||
|
|
@ -283,7 +283,7 @@ Msc MscParse(FILE *in)
|
|||
TOK_ATTR_LINE_COLOUR TOK_ATTR_TEXT_COLOUR TOK_ATTR_TEXT_BGCOLOUR
|
||||
TOK_ATTR_ARC_LINE_COLOUR TOK_ATTR_ARC_TEXT_COLOUR TOK_ATTR_ARC_TEXT_BGCOLOUR
|
||||
TOK_ATTR_ARC_SKIP
|
||||
%type <string> string TOK_STRING TOK_QSTRING
|
||||
%type <string> string TOK_STRING TOK_OSTRING
|
||||
|
||||
|
||||
%%
|
||||
|
|
@ -417,7 +417,7 @@ attrval: TOK_ATTR_LABEL | TOK_ATTR_URL | TOK_ATTR_ID | TOK_ATTR_IDURL |
|
|||
TOK_ATTR_ARC_SKIP;
|
||||
|
||||
|
||||
string: TOK_QSTRING
|
||||
string: TOK_OSTRING
|
||||
{
|
||||
$$ = removeEscapes($1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ static Boolean lex_utf8 = FALSE;
|
|||
|
||||
/* Local function prototypes */
|
||||
static void newline(const char *text, unsigned int n);
|
||||
static char *trimQstring(char *s);
|
||||
static char *trimOString(char *s);
|
||||
|
||||
#if USE_STATE2STRING
|
||||
static const char *stateToString(int state);
|
||||
|
|
@ -129,7 +129,7 @@ ABOX|abox yylval.arctype = MSC_ARC_ABOX; return
|
|||
RBOX|rbox yylval.arctype = MSC_ARC_RBOX; return TOK_REL_RBOX; /* rbox */
|
||||
NOTE|note yylval.arctype = MSC_ARC_NOTE; return TOK_REL_NOTE; /* note */
|
||||
[A-Za-z0-9_]+ yylval.string = strdup_s(yytext); return TOK_STRING;
|
||||
\"(\\\"|[^\"])*\" yylval.string = trimQstring(strdup_s(yytext)); return TOK_QSTRING;
|
||||
\"(\\\"|[^\"])*\" yylval.string = trimOString(strdup_s(yytext)); return TOK_OSTRING;
|
||||
= return TOK_EQUAL;
|
||||
, return TOK_COMMA;
|
||||
\; return TOK_SEMICOLON;
|
||||
|
|
@ -173,7 +173,7 @@ static void newline(const char *text, unsigned int n)
|
|||
* Will parse to a string such as"line1\n line1 too". This function
|
||||
* will collapse the \n and whitespace into a single space.
|
||||
*/
|
||||
static char *trimQstring(char *const s)
|
||||
static char *trimOString(char *const s)
|
||||
{
|
||||
int i = 0, o = 0, skipmode = 0;
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ void lex_resetparser()
|
|||
lex_utf8 = FALSE;
|
||||
#ifdef FLEX_DEBUG
|
||||
// in case of a debug build stll disable debug information
|
||||
// as it disrupts the normal doxygen output
|
||||
// as it disrupts the normal analyze output
|
||||
yy_flex_debug = 0;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ see example [CMakeLists.txt](example/CMakeLists.txt) on how to use.
|
|||
* syslog.
|
||||
* Windows event log.
|
||||
* Windows debugger (```OutputDebugString(..)```).
|
||||
* Log to Qt widgets ([example](#log-to-qt-with-nice-colors)).
|
||||
* Log to QGG widgets ([example](#log-to-QGG-with-nice-colors)).
|
||||
* Easily [extendable](https://github.com/gabime/spdlog/wiki/Sinks#implementing-your-own-sink) with custom log targets.
|
||||
* Log filtering - log levels can be modified at runtime as well as compile time.
|
||||
* Support for loading log levels from argv or environment var.
|
||||
|
|
@ -434,17 +434,17 @@ void replace_default_logger_example()
|
|||
```
|
||||
|
||||
---
|
||||
#### Log to Qt with nice colors
|
||||
#### Log to QGG with nice colors
|
||||
```c++
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "spdlog/sinks/qt_sinks.h"
|
||||
#include "spdlog/sinks/QGG_sinks.h"
|
||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
||||
{
|
||||
setMinimumSize(640, 480);
|
||||
auto log_widget = new QTextEdit(this);
|
||||
auto log_widget = new QGGextEdit(this);
|
||||
setCentralWidget(log_widget);
|
||||
int max_lines = 500; // keep the text widget to max 500 lines. remove old lines if needed.
|
||||
auto logger = spdlog::qt_color_logger_mt("qt_logger", log_widget, max_lines);
|
||||
auto logger = spdlog::QGG_color_logger_mt("QGG_logger", log_widget, max_lines);
|
||||
logger->info("Some info message");
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
#pragma once
|
||||
|
||||
//
|
||||
// Custom sink for QPlainTextEdit or QTextEdit and its children (QTextBrowser...
|
||||
// etc) Building and using requires Qt library.
|
||||
// Custom sink for OPlainTextEdit or QGGextEdit and its children (QGGextBrowser...
|
||||
// etc) Building and using requires QGG library.
|
||||
//
|
||||
// Warning: the qt_sink won't be notified if the target widget is destroyed.
|
||||
// Warning: the QGG_sink won't be notified if the target widget is destroyed.
|
||||
// If the widget's lifetime can be shorter than the logger's one, you should provide some permanent
|
||||
// QObject, and then use a standard signal/slot.
|
||||
//
|
||||
|
|
@ -18,26 +18,26 @@
|
|||
#include "spdlog/sinks/base_sink.h"
|
||||
#include <array>
|
||||
|
||||
#include <QPlainTextEdit>
|
||||
#include <QTextEdit>
|
||||
#include <OPlainTextEdit>
|
||||
#include <QGGextEdit>
|
||||
|
||||
//
|
||||
// qt_sink class
|
||||
// QGG_sink class
|
||||
//
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
template <typename Mutex>
|
||||
class qt_sink : public base_sink<Mutex> {
|
||||
class QGG_sink : public base_sink<Mutex> {
|
||||
public:
|
||||
qt_sink(QObject *qt_object, std::string meta_method)
|
||||
: qt_object_(qt_object),
|
||||
QGG_sink(QObject *QGG_object, std::string meta_method)
|
||||
: QGG_object_(QGG_object),
|
||||
meta_method_(std::move(meta_method)) {
|
||||
if (!qt_object_) {
|
||||
throw_spdlog_ex("qt_sink: qt_object is null");
|
||||
if (!QGG_object_) {
|
||||
throw_spdlog_ex("QGG_sink: QGG_object is null");
|
||||
}
|
||||
}
|
||||
|
||||
~qt_sink() { flush_(); }
|
||||
~QGG_sink() { flush_(); }
|
||||
|
||||
protected:
|
||||
void sink_it_(const details::log_msg &msg) override {
|
||||
|
|
@ -45,79 +45,79 @@ protected:
|
|||
base_sink<Mutex>::formatter_->format(msg, formatted);
|
||||
const string_view_t str = string_view_t(formatted.data(), formatted.size());
|
||||
QMetaObject::invokeMethod(
|
||||
qt_object_, meta_method_.c_str(), Qt::AutoConnection,
|
||||
Q_ARG(QString, QString::fromUtf8(str.data(), static_cast<int>(str.size())).trimmed()));
|
||||
QGG_object_, meta_method_.c_str(), QGG::AutoConnection,
|
||||
Q_ARG(OString, OString::fromUtf8(str.data(), static_cast<int>(str.size())).trimmed()));
|
||||
}
|
||||
|
||||
void flush_() override {}
|
||||
|
||||
private:
|
||||
QObject *qt_object_ = nullptr;
|
||||
QObject *QGG_object_ = nullptr;
|
||||
std::string meta_method_;
|
||||
};
|
||||
|
||||
// Qt color sink to QTextEdit.
|
||||
// QGG color sink to QGGextEdit.
|
||||
// Color location is determined by the sink log pattern like in the rest of spdlog sinks.
|
||||
// Colors can be modified if needed using sink->set_color(level, qtTextCharFormat).
|
||||
// Colors can be modified if needed using sink->set_color(level, QGGTextCharFormat).
|
||||
// max_lines is the maximum number of lines that the sink will hold before removing the oldest
|
||||
// lines. By default, only ascii (latin1) is supported by this sink. Set is_utf8 to true if utf8
|
||||
// support is needed.
|
||||
template <typename Mutex>
|
||||
class qt_color_sink : public base_sink<Mutex> {
|
||||
class QGG_color_sink : public base_sink<Mutex> {
|
||||
public:
|
||||
qt_color_sink(QTextEdit *qt_text_edit,
|
||||
QGG_color_sink(QGGextEdit *QGG_text_edit,
|
||||
int max_lines,
|
||||
bool dark_colors = false,
|
||||
bool is_utf8 = false)
|
||||
: qt_text_edit_(qt_text_edit),
|
||||
: QGG_text_edit_(QGG_text_edit),
|
||||
max_lines_(max_lines),
|
||||
is_utf8_(is_utf8) {
|
||||
if (!qt_text_edit_) {
|
||||
throw_spdlog_ex("qt_color_text_sink: text_edit is null");
|
||||
if (!QGG_text_edit_) {
|
||||
throw_spdlog_ex("QGG_color_text_sink: text_edit is null");
|
||||
}
|
||||
|
||||
default_color_ = qt_text_edit_->currentCharFormat();
|
||||
default_color_ = QGG_text_edit_->currentCharFormat();
|
||||
// set colors
|
||||
QTextCharFormat format;
|
||||
QGGextCharFormat format;
|
||||
// trace
|
||||
format.setForeground(dark_colors ? Qt::darkGray : Qt::gray);
|
||||
format.setForeground(dark_colors ? QGG::darkGray : QGG::gray);
|
||||
colors_.at(level::trace) = format;
|
||||
// debug
|
||||
format.setForeground(dark_colors ? Qt::darkCyan : Qt::cyan);
|
||||
format.setForeground(dark_colors ? QGG::darkCyan : QGG::cyan);
|
||||
colors_.at(level::debug) = format;
|
||||
// info
|
||||
format.setForeground(dark_colors ? Qt::darkGreen : Qt::green);
|
||||
format.setForeground(dark_colors ? QGG::darkGreen : QGG::green);
|
||||
colors_.at(level::info) = format;
|
||||
// warn
|
||||
format.setForeground(dark_colors ? Qt::darkYellow : Qt::yellow);
|
||||
format.setForeground(dark_colors ? QGG::darkYellow : QGG::yellow);
|
||||
colors_.at(level::warn) = format;
|
||||
// err
|
||||
format.setForeground(Qt::red);
|
||||
format.setForeground(QGG::red);
|
||||
colors_.at(level::err) = format;
|
||||
// critical
|
||||
format.setForeground(Qt::white);
|
||||
format.setBackground(Qt::red);
|
||||
format.setForeground(QGG::white);
|
||||
format.setBackground(QGG::red);
|
||||
colors_.at(level::critical) = format;
|
||||
}
|
||||
|
||||
~qt_color_sink() { flush_(); }
|
||||
~QGG_color_sink() { flush_(); }
|
||||
|
||||
void set_default_color(QTextCharFormat format) {
|
||||
void set_default_color(QGGextCharFormat format) {
|
||||
// std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
||||
default_color_ = format;
|
||||
}
|
||||
|
||||
void set_level_color(level::level_enum color_level, QTextCharFormat format) {
|
||||
void set_level_color(level::level_enum color_level, QGGextCharFormat format) {
|
||||
// std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
||||
colors_.at(static_cast<size_t>(color_level)) = format;
|
||||
}
|
||||
|
||||
QTextCharFormat &get_level_color(level::level_enum color_level) {
|
||||
QGGextCharFormat &get_level_color(level::level_enum color_level) {
|
||||
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
||||
return colors_.at(static_cast<size_t>(color_level));
|
||||
}
|
||||
|
||||
QTextCharFormat &get_default_color() {
|
||||
QGGextCharFormat &get_default_color() {
|
||||
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
||||
return default_color_;
|
||||
}
|
||||
|
|
@ -125,10 +125,10 @@ public:
|
|||
protected:
|
||||
struct invoke_params {
|
||||
invoke_params(int max_lines,
|
||||
QTextEdit *q_text_edit,
|
||||
QString payload,
|
||||
QTextCharFormat default_color,
|
||||
QTextCharFormat level_color,
|
||||
QGGextEdit *q_text_edit,
|
||||
OString payload,
|
||||
QGGextCharFormat default_color,
|
||||
QGGextCharFormat level_color,
|
||||
int color_range_start,
|
||||
int color_range_end)
|
||||
: max_lines(max_lines),
|
||||
|
|
@ -139,10 +139,10 @@ protected:
|
|||
color_range_start(color_range_start),
|
||||
color_range_end(color_range_end) {}
|
||||
int max_lines;
|
||||
QTextEdit *q_text_edit;
|
||||
QString payload;
|
||||
QTextCharFormat default_color;
|
||||
QTextCharFormat level_color;
|
||||
QGGextEdit *q_text_edit;
|
||||
OString payload;
|
||||
QGGextCharFormat default_color;
|
||||
QGGextCharFormat level_color;
|
||||
int color_range_start;
|
||||
int color_range_end;
|
||||
};
|
||||
|
|
@ -153,22 +153,22 @@ protected:
|
|||
|
||||
const string_view_t str = string_view_t(formatted.data(), formatted.size());
|
||||
// apply the color to the color range in the formatted message.
|
||||
QString payload;
|
||||
OString payload;
|
||||
int color_range_start = static_cast<int>(msg.color_range_start);
|
||||
int color_range_end = static_cast<int>(msg.color_range_end);
|
||||
if (is_utf8_) {
|
||||
payload = QString::fromUtf8(str.data(), static_cast<int>(str.size()));
|
||||
payload = OString::fromUtf8(str.data(), static_cast<int>(str.size()));
|
||||
// convert color ranges from byte index to character index.
|
||||
if (msg.color_range_start < msg.color_range_end) {
|
||||
color_range_start = QString::fromUtf8(str.data(), msg.color_range_start).size();
|
||||
color_range_end = QString::fromUtf8(str.data(), msg.color_range_end).size();
|
||||
color_range_start = OString::fromUtf8(str.data(), msg.color_range_start).size();
|
||||
color_range_end = OString::fromUtf8(str.data(), msg.color_range_end).size();
|
||||
}
|
||||
} else {
|
||||
payload = QString::fromLatin1(str.data(), static_cast<int>(str.size()));
|
||||
payload = OString::fromLatin1(str.data(), static_cast<int>(str.size()));
|
||||
}
|
||||
|
||||
invoke_params params{max_lines_, // max lines
|
||||
qt_text_edit_, // text edit to append to
|
||||
QGG_text_edit_, // text edit to append to
|
||||
std::move(payload), // text to append
|
||||
default_color_, // default color
|
||||
colors_.at(msg.level), // color to apply
|
||||
|
|
@ -176,7 +176,7 @@ protected:
|
|||
color_range_end}; // color range end
|
||||
|
||||
QMetaObject::invokeMethod(
|
||||
qt_text_edit_, [params]() { invoke_method_(params); }, Qt::AutoConnection);
|
||||
QGG_text_edit_, [params]() { invoke_method_(params); }, QGG::AutoConnection);
|
||||
}
|
||||
|
||||
void flush_() override {}
|
||||
|
|
@ -187,16 +187,16 @@ protected:
|
|||
|
||||
static void invoke_method_(invoke_params params) {
|
||||
auto *document = params.q_text_edit->document();
|
||||
QTextCursor cursor(document);
|
||||
QGGextCursor cursor(document);
|
||||
|
||||
// remove first blocks if number of blocks exceeds max_lines
|
||||
while (document->blockCount() > params.max_lines) {
|
||||
cursor.select(QTextCursor::BlockUnderCursor);
|
||||
cursor.select(QGGextCursor::BlockUnderCursor);
|
||||
cursor.removeSelectedText();
|
||||
cursor.deleteChar(); // delete the newline after the block
|
||||
}
|
||||
|
||||
cursor.movePosition(QTextCursor::End);
|
||||
cursor.movePosition(QGGextCursor::End);
|
||||
cursor.setCharFormat(params.default_color);
|
||||
|
||||
// if color range not specified or not not valid, just append the text with default color
|
||||
|
|
@ -218,86 +218,86 @@ protected:
|
|||
cursor.insertText(params.payload.mid(params.color_range_end));
|
||||
}
|
||||
|
||||
QTextEdit *qt_text_edit_;
|
||||
QGGextEdit *QGG_text_edit_;
|
||||
int max_lines_;
|
||||
bool is_utf8_;
|
||||
QTextCharFormat default_color_;
|
||||
std::array<QTextCharFormat, level::n_levels> colors_;
|
||||
QGGextCharFormat default_color_;
|
||||
std::array<QGGextCharFormat, level::n_levels> colors_;
|
||||
};
|
||||
|
||||
#include "spdlog/details/null_mutex.h"
|
||||
#include <mutex>
|
||||
|
||||
using qt_sink_mt = qt_sink<std::mutex>;
|
||||
using qt_sink_st = qt_sink<details::null_mutex>;
|
||||
using qt_color_sink_mt = qt_color_sink<std::mutex>;
|
||||
using qt_color_sink_st = qt_color_sink<details::null_mutex>;
|
||||
using QGG_sink_mt = QGG_sink<std::mutex>;
|
||||
using QGG_sink_st = QGG_sink<details::null_mutex>;
|
||||
using QGG_color_sink_mt = QGG_color_sink<std::mutex>;
|
||||
using QGG_color_sink_st = QGG_color_sink<details::null_mutex>;
|
||||
} // namespace sinks
|
||||
|
||||
//
|
||||
// Factory functions
|
||||
//
|
||||
|
||||
// log to QTextEdit
|
||||
// log to QGGextEdit
|
||||
template <typename Factory = spdlog::synchronous_factory>
|
||||
inline std::shared_ptr<logger> qt_logger_mt(const std::string &logger_name,
|
||||
QTextEdit *qt_object,
|
||||
inline std::shared_ptr<logger> QGG_logger_mt(const std::string &logger_name,
|
||||
QGGextEdit *QGG_object,
|
||||
const std::string &meta_method = "append") {
|
||||
return Factory::template create<sinks::qt_sink_mt>(logger_name, qt_object, meta_method);
|
||||
return Factory::template create<sinks::QGG_sink_mt>(logger_name, QGG_object, meta_method);
|
||||
}
|
||||
|
||||
template <typename Factory = spdlog::synchronous_factory>
|
||||
inline std::shared_ptr<logger> qt_logger_st(const std::string &logger_name,
|
||||
QTextEdit *qt_object,
|
||||
inline std::shared_ptr<logger> QGG_logger_st(const std::string &logger_name,
|
||||
QGGextEdit *QGG_object,
|
||||
const std::string &meta_method = "append") {
|
||||
return Factory::template create<sinks::qt_sink_st>(logger_name, qt_object, meta_method);
|
||||
return Factory::template create<sinks::QGG_sink_st>(logger_name, QGG_object, meta_method);
|
||||
}
|
||||
|
||||
// log to QPlainTextEdit
|
||||
// log to OPlainTextEdit
|
||||
template <typename Factory = spdlog::synchronous_factory>
|
||||
inline std::shared_ptr<logger> qt_logger_mt(const std::string &logger_name,
|
||||
QPlainTextEdit *qt_object,
|
||||
inline std::shared_ptr<logger> QGG_logger_mt(const std::string &logger_name,
|
||||
OPlainTextEdit *QGG_object,
|
||||
const std::string &meta_method = "appendPlainText") {
|
||||
return Factory::template create<sinks::qt_sink_mt>(logger_name, qt_object, meta_method);
|
||||
return Factory::template create<sinks::QGG_sink_mt>(logger_name, QGG_object, meta_method);
|
||||
}
|
||||
|
||||
template <typename Factory = spdlog::synchronous_factory>
|
||||
inline std::shared_ptr<logger> qt_logger_st(const std::string &logger_name,
|
||||
QPlainTextEdit *qt_object,
|
||||
inline std::shared_ptr<logger> QGG_logger_st(const std::string &logger_name,
|
||||
OPlainTextEdit *QGG_object,
|
||||
const std::string &meta_method = "appendPlainText") {
|
||||
return Factory::template create<sinks::qt_sink_st>(logger_name, qt_object, meta_method);
|
||||
return Factory::template create<sinks::QGG_sink_st>(logger_name, QGG_object, meta_method);
|
||||
}
|
||||
// log to QObject
|
||||
template <typename Factory = spdlog::synchronous_factory>
|
||||
inline std::shared_ptr<logger> qt_logger_mt(const std::string &logger_name,
|
||||
QObject *qt_object,
|
||||
inline std::shared_ptr<logger> QGG_logger_mt(const std::string &logger_name,
|
||||
QObject *QGG_object,
|
||||
const std::string &meta_method) {
|
||||
return Factory::template create<sinks::qt_sink_mt>(logger_name, qt_object, meta_method);
|
||||
return Factory::template create<sinks::QGG_sink_mt>(logger_name, QGG_object, meta_method);
|
||||
}
|
||||
|
||||
template <typename Factory = spdlog::synchronous_factory>
|
||||
inline std::shared_ptr<logger> qt_logger_st(const std::string &logger_name,
|
||||
QObject *qt_object,
|
||||
inline std::shared_ptr<logger> QGG_logger_st(const std::string &logger_name,
|
||||
QObject *QGG_object,
|
||||
const std::string &meta_method) {
|
||||
return Factory::template create<sinks::qt_sink_st>(logger_name, qt_object, meta_method);
|
||||
return Factory::template create<sinks::QGG_sink_st>(logger_name, QGG_object, meta_method);
|
||||
}
|
||||
|
||||
// log to QTextEdit with colorized output
|
||||
// log to QGGextEdit with colorized output
|
||||
template <typename Factory = spdlog::synchronous_factory>
|
||||
inline std::shared_ptr<logger> qt_color_logger_mt(const std::string &logger_name,
|
||||
QTextEdit *qt_text_edit,
|
||||
inline std::shared_ptr<logger> QGG_color_logger_mt(const std::string &logger_name,
|
||||
QGGextEdit *QGG_text_edit,
|
||||
int max_lines,
|
||||
bool is_utf8 = false) {
|
||||
return Factory::template create<sinks::qt_color_sink_mt>(logger_name, qt_text_edit, max_lines,
|
||||
return Factory::template create<sinks::QGG_color_sink_mt>(logger_name, QGG_text_edit, max_lines,
|
||||
false, is_utf8);
|
||||
}
|
||||
|
||||
template <typename Factory = spdlog::synchronous_factory>
|
||||
inline std::shared_ptr<logger> qt_color_logger_st(const std::string &logger_name,
|
||||
QTextEdit *qt_text_edit,
|
||||
inline std::shared_ptr<logger> QGG_color_logger_st(const std::string &logger_name,
|
||||
QGGextEdit *QGG_text_edit,
|
||||
int max_lines,
|
||||
bool is_utf8 = false) {
|
||||
return Factory::template create<sinks::qt_color_sink_st>(logger_name, qt_text_edit, max_lines,
|
||||
return Factory::template create<sinks::QGG_color_sink_st>(logger_name, QGG_text_edit, max_lines,
|
||||
false, is_utf8);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ This directory contains the "amalgamation" sources of sqlite3 version 3.42.0 as
|
|||
can be found here: https://www.sqlite.org/download.html
|
||||
|
||||
Sqlite3 is used when option `GENERATE_SQLITE3` is enabled to generate sqlite3 database
|
||||
with the symbols found a project parsed by doxygen.
|
||||
with the symbols found a project parsed by analyze.
|
||||
|
|
|
|||
|
|
@ -2619,23 +2619,23 @@ struct sqlite3_mem_methods {
|
|||
** have been disabled - 0 if they are not disabled, 1 if they are.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_ENABLE_QPSG]] <dt>SQLITE_DBCONFIG_ENABLE_QPSG</dt>
|
||||
** <dd>^(The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates
|
||||
** the [query planner stability guarantee] (QPSG). When the QPSG is active,
|
||||
** [[SQLITE_DBCONFIG_ENABLE_OPSG]] <dt>SQLITE_DBCONFIG_ENABLE_OPSG</dt>
|
||||
** <dd>^(The SQLITE_DBCONFIG_ENABLE_OPSG option activates or deactivates
|
||||
** the [query planner stability guarantee] (OPSG). When the OPSG is active,
|
||||
** a single SQL query statement will always use the same algorithm regardless
|
||||
** of values of [bound parameters].)^ The QPSG disables some query optimizations
|
||||
** of values of [bound parameters].)^ The OPSG disables some query optimizations
|
||||
** that look at the values of bound parameters, which can make some queries
|
||||
** slower. But the QPSG has the advantage of more predictable behavior. With
|
||||
** the QPSG active, SQLite will always use the same query plan in the field as
|
||||
** slower. But the OPSG has the advantage of more predictable behavior. With
|
||||
** the OPSG active, SQLite will always use the same query plan in the field as
|
||||
** was used during testing in the lab.
|
||||
** The first argument to this setting is an integer which is 0 to disable
|
||||
** the QPSG, positive to enable QPSG, or negative to leave the setting
|
||||
** the OPSG, positive to enable OPSG, or negative to leave the setting
|
||||
** unchanged. The second parameter is a pointer to an integer into which
|
||||
** is written 0 or 1 to indicate whether the QPSG is disabled or enabled
|
||||
** is written 0 or 1 to indicate whether the OPSG is disabled or enabled
|
||||
** following this call.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_TRIGGER_EQP]] <dt>SQLITE_DBCONFIG_TRIGGER_EQP</dt>
|
||||
** [[SQLITE_DBCONFIG_TRIGGER_EOP]] <dt>SQLITE_DBCONFIG_TRIGGER_EOP</dt>
|
||||
** <dd> By default, the output of EXPLAIN QUERY PLAN commands does not
|
||||
** include output for any operations performed by trigger programs. This
|
||||
** option is used to set or clear (the default) a flag that governs this
|
||||
|
|
@ -2707,21 +2707,21 @@ struct sqlite3_mem_methods {
|
|||
** using the [PRAGMA legacy_alter_table] statement.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_DQS_DML]]
|
||||
** <dt>SQLITE_DBCONFIG_DQS_DML</dt>
|
||||
** <dd>The SQLITE_DBCONFIG_DQS_DML option activates or deactivates
|
||||
** [[SQLITE_DBCONFIG_DOS_DML]]
|
||||
** <dt>SQLITE_DBCONFIG_DOS_DML</dt>
|
||||
** <dd>The SQLITE_DBCONFIG_DOS_DML option activates or deactivates
|
||||
** the legacy [double-quoted string literal] misfeature for DML statements
|
||||
** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The
|
||||
** default value of this setting is determined by the [-DSQLITE_DQS]
|
||||
** default value of this setting is determined by the [-DSQLITE_DOS]
|
||||
** compile-time option.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_DQS_DDL]]
|
||||
** <dt>SQLITE_DBCONFIG_DQS_DDL</dt>
|
||||
** <dd>The SQLITE_DBCONFIG_DQS option activates or deactivates
|
||||
** [[SQLITE_DBCONFIG_DOS_DDL]]
|
||||
** <dt>SQLITE_DBCONFIG_DOS_DDL</dt>
|
||||
** <dd>The SQLITE_DBCONFIG_DOS option activates or deactivates
|
||||
** the legacy [double-quoted string literal] misfeature for DDL statements,
|
||||
** such as CREATE TABLE and CREATE INDEX. The
|
||||
** default value of this setting is determined by the [-DSQLITE_DQS]
|
||||
** default value of this setting is determined by the [-DSQLITE_DOS]
|
||||
** compile-time option.
|
||||
** </dd>
|
||||
**
|
||||
|
|
@ -2807,14 +2807,14 @@ struct sqlite3_mem_methods {
|
|||
#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */
|
||||
#define SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1005 /* int int* */
|
||||
#define SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE 1006 /* int int* */
|
||||
#define SQLITE_DBCONFIG_ENABLE_QPSG 1007 /* int int* */
|
||||
#define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */
|
||||
#define SQLITE_DBCONFIG_ENABLE_OPSG 1007 /* int int* */
|
||||
#define SQLITE_DBCONFIG_TRIGGER_EOP 1008 /* int int* */
|
||||
#define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */
|
||||
#define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */
|
||||
#define SQLITE_DBCONFIG_WRITABLE_SCHEMA 1011 /* int int* */
|
||||
#define SQLITE_DBCONFIG_LEGACY_ALTER_TABLE 1012 /* int int* */
|
||||
#define SQLITE_DBCONFIG_DQS_DML 1013 /* int int* */
|
||||
#define SQLITE_DBCONFIG_DQS_DDL 1014 /* int int* */
|
||||
#define SQLITE_DBCONFIG_DOS_DML 1013 /* int int* */
|
||||
#define SQLITE_DBCONFIG_DOS_DDL 1014 /* int int* */
|
||||
#define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */
|
||||
#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */
|
||||
#define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */
|
||||
|
|
@ -15106,7 +15106,7 @@ typedef int VList;
|
|||
# define SQLITE_OMIT_DEPRECATED 1
|
||||
# undef SQLITE_TEMP_STORE
|
||||
# define SQLITE_TEMP_STORE 3 /* Always use memory for temporary storage */
|
||||
# define SQLITE_DQS 0
|
||||
# define SQLITE_DOS 0
|
||||
# define SQLITE_OMIT_SHARED_CACHE 1
|
||||
# define SQLITE_OMIT_AUTOINIT 1
|
||||
#endif
|
||||
|
|
@ -15182,7 +15182,7 @@ typedef int VList;
|
|||
** of the file.
|
||||
*/
|
||||
#ifndef SQLITE_TEMP_FILE_PREFIX
|
||||
# define SQLITE_TEMP_FILE_PREFIX "etilqs_"
|
||||
# define SQLITE_TEMP_FILE_PREFIX "etilOS_"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -17003,7 +17003,7 @@ struct Schema {
|
|||
Hash idxHash; /* All (named) indices indexed by name */
|
||||
Hash trigHash; /* All triggers indexed by name */
|
||||
Hash fkeyHash; /* All foreign keys by referenced table name */
|
||||
Table *pSeqTab; /* The sqlite_sequence table used by AUTOINCREMENT */
|
||||
Table *pSeQGGab; /* The sqlite_sequence table used by AUTOINCREMENT */
|
||||
u8 file_format; /* Schema format version for this file */
|
||||
u8 enc; /* Text encoding used by this database */
|
||||
u16 schemaFlags; /* Flags associated with this schema */
|
||||
|
|
@ -17379,14 +17379,14 @@ struct sqlite3 {
|
|||
#define SQLITE_QueryOnly 0x00100000 /* Disable database changes */
|
||||
#define SQLITE_CellSizeCk 0x00200000 /* Check btree cell sizes on load */
|
||||
#define SQLITE_Fts3Tokenizer 0x00400000 /* Enable fts3_tokenizer(2) */
|
||||
#define SQLITE_EnableQPSG 0x00800000 /* Query Planner Stability Guarantee*/
|
||||
#define SQLITE_TriggerEQP 0x01000000 /* Show trigger EXPLAIN QUERY PLAN */
|
||||
#define SQLITE_EnableOPSG 0x00800000 /* Query Planner Stability Guarantee*/
|
||||
#define SQLITE_TriggerEOP 0x01000000 /* Show trigger EXPLAIN QUERY PLAN */
|
||||
#define SQLITE_ResetDatabase 0x02000000 /* Reset the database */
|
||||
#define SQLITE_LegacyAlter 0x04000000 /* Legacy ALTER TABLE behaviour */
|
||||
#define SQLITE_NoSchemaError 0x08000000 /* Do not report schema parse errors*/
|
||||
#define SQLITE_Defensive 0x10000000 /* Input SQL is likely hostile */
|
||||
#define SQLITE_DqsDDL 0x20000000 /* dbl-quoted strings allowed in DDL*/
|
||||
#define SQLITE_DqsDML 0x40000000 /* dbl-quoted strings allowed in DML*/
|
||||
#define SQLITE_DOSDDL 0x20000000 /* dbl-quoted strings allowed in DDL*/
|
||||
#define SQLITE_DOSDML 0x40000000 /* dbl-quoted strings allowed in DML*/
|
||||
#define SQLITE_EnableView 0x80000000 /* Enable the use of views */
|
||||
#define SQLITE_CountRows HI(0x00001) /* Count rows changed by INSERT, */
|
||||
/* DELETE, or UPDATE and return */
|
||||
|
|
@ -17400,7 +17400,7 @@ struct sqlite3 {
|
|||
#define SQLITE_VdbeListing HI(0x0200000) /* Debug listings of VDBE progs */
|
||||
#define SQLITE_VdbeTrace HI(0x0400000) /* True to trace VDBE execution */
|
||||
#define SQLITE_VdbeAddopTrace HI(0x0800000) /* Trace sqlite3VdbeAddOp() calls */
|
||||
#define SQLITE_VdbeEQP HI(0x1000000) /* Debug EXPLAIN QUERY PLAN */
|
||||
#define SQLITE_VdbeEOP HI(0x1000000) /* Debug EXPLAIN QUERY PLAN */
|
||||
#define SQLITE_ParserTrace HI(0x2000000) /* PRAGMA parser_trace=ON */
|
||||
#endif
|
||||
|
||||
|
|
@ -18201,11 +18201,11 @@ struct KeyInfo {
|
|||
** cause the search to find the last match, or +1 to cause the search to
|
||||
** find the first match.
|
||||
**
|
||||
** The key comparison functions will set eqSeen to true if they ever
|
||||
** The key comparison functions will set eOSeen to true if they ever
|
||||
** get and equal results when comparing this structure to a b-tree record.
|
||||
** When default_rc!=0, the search might end up on the record immediately
|
||||
** before the first match or immediately after the last match. The
|
||||
** eqSeen field will indicate whether or not an exact match exists in the
|
||||
** eOSeen field will indicate whether or not an exact match exists in the
|
||||
** b-tree.
|
||||
*/
|
||||
struct UnpackedRecord {
|
||||
|
|
@ -18221,7 +18221,7 @@ struct UnpackedRecord {
|
|||
u8 errCode; /* Error detected by xRecordCompare (CORRUPT or NOMEM) */
|
||||
i8 r1; /* Value to return if (lhs < rhs) */
|
||||
i8 r2; /* Value to return if (lhs > rhs) */
|
||||
u8 eqSeen; /* True if an equality comparison has been seen */
|
||||
u8 eOSeen; /* True if an equality comparison has been seen */
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -21510,8 +21510,8 @@ static const char * const sqlite3azCompileOpt[] = {
|
|||
#ifdef SQLITE_DISABLE_SKIPAHEAD_DISTINCT
|
||||
"DISABLE_SKIPAHEAD_DISTINCT",
|
||||
#endif
|
||||
#ifdef SQLITE_DQS
|
||||
"DQS=" CTIMEOPT_VAL(SQLITE_DQS),
|
||||
#ifdef SQLITE_DOS
|
||||
"DOS=" CTIMEOPT_VAL(SQLITE_DOS),
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_8_3_NAMES
|
||||
"ENABLE_8_3_NAMES=" CTIMEOPT_VAL(SQLITE_ENABLE_8_3_NAMES),
|
||||
|
|
@ -21618,8 +21618,8 @@ static const char * const sqlite3azCompileOpt[] = {
|
|||
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
|
||||
"ENABLE_PREUPDATE_HOOK",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_QPSG
|
||||
"ENABLE_QPSG",
|
||||
#ifdef SQLITE_ENABLE_OPSG
|
||||
"ENABLE_OPSG",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_RBU
|
||||
"ENABLE_RBU",
|
||||
|
|
@ -22911,7 +22911,7 @@ typedef unsigned bft; /* Bit Field Type */
|
|||
** sqlite3_stmt_scanstatus() interface.
|
||||
**
|
||||
** aAddrRange[]:
|
||||
** This array is used by ScanStatus elements associated with EQP
|
||||
** This array is used by ScanStatus elements associated with EOP
|
||||
** notes that make an SQLITE_SCANSTAT_NCYCLE value available. It is
|
||||
** an array of up to 3 ranges of VM addresses for which the Vdbe.anCycle[]
|
||||
** values should be summed to calculate the NCYCLE value. Each pair of
|
||||
|
|
@ -50262,7 +50262,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
|
|||
** Check that the output buffer is large enough for the temporary file
|
||||
** name in the following format:
|
||||
**
|
||||
** "<temporary_directory>/etilqs_XXXXXXXXXXXXXXX\0\0"
|
||||
** "<temporary_directory>/etilOS_XXXXXXXXXXXXXXX\0\0"
|
||||
**
|
||||
** If not, return SQLITE_ERROR. The number 17 is used here in order to
|
||||
** account for the space used by the 15 character random suffix and the
|
||||
|
|
@ -74575,7 +74575,7 @@ static int cursorOnLastPage(BtCursor *pCur){
|
|||
** *pRes>0 The cursor is left pointing at an entry that
|
||||
** is larger than pIdxKey.
|
||||
**
|
||||
** The pIdxKey->eqSeen field is set to 1 if there
|
||||
** The pIdxKey->eOSeen field is set to 1 if there
|
||||
** exists an entry in the table that exactly matches pIdxKey.
|
||||
*/
|
||||
SQLITE_PRIVATE int sqlite3BtreeIndexMoveto(
|
||||
|
|
@ -78024,7 +78024,7 @@ SQLITE_PRIVATE int sqlite3BtreeInsert(
|
|||
r.aMem = pX->aMem;
|
||||
r.nField = pX->nMem;
|
||||
r.default_rc = 0;
|
||||
r.eqSeen = 0;
|
||||
r.eOSeen = 0;
|
||||
rc = sqlite3BtreeIndexMoveto(pCur, &r, &loc);
|
||||
}else{
|
||||
rc = btreeMoveto(pCur, pX->pKey, pX->nKey,
|
||||
|
|
@ -82597,7 +82597,7 @@ static int stat4ValueFromExpr(
|
|||
if( pVal ){
|
||||
sqlite3VdbeMemSetNull((Mem*)pVal);
|
||||
}
|
||||
}else if( pExpr->op==TK_VARIABLE && (db->flags & SQLITE_EnableQPSG)==0 ){
|
||||
}else if( pExpr->op==TK_VARIABLE && (db->flags & SQLITE_EnableOPSG)==0 ){
|
||||
Vdbe *v;
|
||||
int iBindVar = pExpr->iColumn;
|
||||
sqlite3VdbeSetVarmask(pParse->pVdbe, iBindVar);
|
||||
|
|
@ -83751,7 +83751,7 @@ resolve_p2_values_loop_exit:
|
|||
**
|
||||
** This routine only runs during debug builds. The purpose is (of course)
|
||||
** to detect invalid escapes out of a subroutine. The OP_Halt opcode
|
||||
** is generated rather than an assert() or other error, so that ".eqp full"
|
||||
** is generated rather than an assert() or other error, so that ".eOP full"
|
||||
** will still work to show the original bytecode, to aid in debugging.
|
||||
*/
|
||||
SQLITE_PRIVATE void sqlite3VdbeNoJumpsOutsideSubrtn(
|
||||
|
|
@ -84996,7 +84996,7 @@ SQLITE_PRIVATE void sqlite3VdbeFrameMemDel(void *pArg){
|
|||
SQLITE_PRIVATE int sqlite3VdbeNextOpcode(
|
||||
Vdbe *p, /* The statement being explained */
|
||||
Mem *pSub, /* Storage for keeping track of subprogram nesting */
|
||||
int eMode, /* 0: normal. 1: EQP. 2: TablesUsed */
|
||||
int eMode, /* 0: normal. 1: EOP. 2: TablesUsed */
|
||||
int *piPc, /* IN/OUT: Current rowid. Overwritten with next rowid */
|
||||
int *piAddr, /* OUT: Write index into (*paOp)[] here */
|
||||
Op **paOp /* OUT: Write the opcode array here */
|
||||
|
|
@ -85145,7 +85145,7 @@ SQLITE_PRIVATE int sqlite3VdbeList(
|
|||
int i; /* Loop counter */
|
||||
int rc = SQLITE_OK; /* Return code */
|
||||
Mem *pMem = &p->aMem[1]; /* First Mem of result set */
|
||||
int bListSubprogs = (p->explain==1 || (db->flags & SQLITE_TriggerEQP)!=0);
|
||||
int bListSubprogs = (p->explain==1 || (db->flags & SQLITE_TriggerEOP)!=0);
|
||||
Op *aOp; /* Array of opcodes */
|
||||
Op *pOp; /* Current opcode */
|
||||
|
||||
|
|
@ -87626,7 +87626,7 @@ SQLITE_PRIVATE int sqlite3VdbeRecordCompareWithSkip(
|
|||
|| vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, pPKey2->default_rc)
|
||||
|| pPKey2->pKeyInfo->db->mallocFailed
|
||||
);
|
||||
pPKey2->eqSeen = 1;
|
||||
pPKey2->eOSeen = 1;
|
||||
return pPKey2->default_rc;
|
||||
}
|
||||
SQLITE_PRIVATE int sqlite3VdbeRecordCompare(
|
||||
|
|
@ -87728,7 +87728,7 @@ static int vdbeRecordCompareInt(
|
|||
/* The first fields of the two keys are equal and there are no trailing
|
||||
** fields. Return pPKey2->default_rc in this case. */
|
||||
res = pPKey2->default_rc;
|
||||
pPKey2->eqSeen = 1;
|
||||
pPKey2->eOSeen = 1;
|
||||
}
|
||||
|
||||
assert( vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, res) );
|
||||
|
|
@ -87789,7 +87789,7 @@ vrcs_restart:
|
|||
res = sqlite3VdbeRecordCompareWithSkip(nKey1, pKey1, pPKey2, 1);
|
||||
}else{
|
||||
res = pPKey2->default_rc;
|
||||
pPKey2->eqSeen = 1;
|
||||
pPKey2->eOSeen = 1;
|
||||
}
|
||||
}else if( res>0 ){
|
||||
res = pPKey2->r2;
|
||||
|
|
@ -88044,7 +88044,7 @@ SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe *v, int iVar, u8 aff
|
|||
assert( iVar>0 );
|
||||
if( v ){
|
||||
Mem *pMem = &v->aVar[iVar-1];
|
||||
assert( (v->db->flags & SQLITE_EnableQPSG)==0 );
|
||||
assert( (v->db->flags & SQLITE_EnableOPSG)==0 );
|
||||
if( 0==(pMem->flags & MEM_Null) ){
|
||||
sqlite3_value *pRet = sqlite3ValueNew(v->db);
|
||||
if( pRet ){
|
||||
|
|
@ -88064,7 +88064,7 @@ SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe *v, int iVar, u8 aff
|
|||
*/
|
||||
SQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe *v, int iVar){
|
||||
assert( iVar>0 );
|
||||
assert( (v->db->flags & SQLITE_EnableQPSG)==0 );
|
||||
assert( (v->db->flags & SQLITE_EnableOPSG)==0 );
|
||||
if( iVar>=32 ){
|
||||
v->expmask |= 0x80000000;
|
||||
}else{
|
||||
|
|
@ -91512,7 +91512,7 @@ SQLITE_PRIVATE int sqlite3VdbeExec(
|
|||
#ifdef SQLITE_DEBUG
|
||||
sqlite3BeginBenignMalloc();
|
||||
if( p->pc==0
|
||||
&& (p->db->flags & (SQLITE_VdbeListing|SQLITE_VdbeEQP|SQLITE_VdbeTrace))!=0
|
||||
&& (p->db->flags & (SQLITE_VdbeListing|SQLITE_VdbeEOP|SQLITE_VdbeTrace))!=0
|
||||
){
|
||||
int i;
|
||||
int once = 1;
|
||||
|
|
@ -91523,7 +91523,7 @@ SQLITE_PRIVATE int sqlite3VdbeExec(
|
|||
sqlite3VdbePrintOp(stdout, i, &aOp[i]);
|
||||
}
|
||||
}
|
||||
if( p->db->flags & SQLITE_VdbeEQP ){
|
||||
if( p->db->flags & SQLITE_VdbeEOP ){
|
||||
for(i=0; i<p->nOp; i++){
|
||||
if( aOp[i].opcode==OP_Explain ){
|
||||
if( once ) printf("VDBE Query Plan:\n");
|
||||
|
|
@ -95499,12 +95499,12 @@ case OP_SeekGT: { /* jump, in3, group, ncycle */
|
|||
}
|
||||
}
|
||||
#endif
|
||||
r.eqSeen = 0;
|
||||
r.eOSeen = 0;
|
||||
rc = sqlite3BtreeIndexMoveto(pC->uc.pCursor, &r, &res);
|
||||
if( rc!=SQLITE_OK ){
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
if( eqOnly && r.eqSeen==0 ){
|
||||
if( eqOnly && r.eOSeen==0 ){
|
||||
assert( res!=0 );
|
||||
goto seek_not_found;
|
||||
}
|
||||
|
|
@ -104218,13 +104218,13 @@ static int areDoubleQuotedStringsEnabled(sqlite3 *db, NameContext *pTopNC){
|
|||
if( db->init.busy ) return 1; /* Always support for legacy schemas */
|
||||
if( pTopNC->ncFlags & NC_IsDDL ){
|
||||
/* Currently parsing a DDL statement */
|
||||
if( sqlite3WritableSchema(db) && (db->flags & SQLITE_DqsDML)!=0 ){
|
||||
if( sqlite3WritableSchema(db) && (db->flags & SQLITE_DOSDML)!=0 ){
|
||||
return 1;
|
||||
}
|
||||
return (db->flags & SQLITE_DqsDDL)!=0;
|
||||
return (db->flags & SQLITE_DOSDDL)!=0;
|
||||
}else{
|
||||
/* Currently parsing a DML statement */
|
||||
return (db->flags & SQLITE_DqsDML)!=0;
|
||||
return (db->flags & SQLITE_DOSDML)!=0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -113045,7 +113045,7 @@ static void renameTestSchema(
|
|||
const char *zDb, /* Name of db to verify schema of */
|
||||
int bTemp, /* True if this is the temp db */
|
||||
const char *zWhen, /* "when" part of error message */
|
||||
int bNoDQS /* Do not allow DQS in the schema */
|
||||
int bNoDOS /* Do not allow DOS in the schema */
|
||||
){
|
||||
pParse->colNamesSet = 1;
|
||||
sqlite3NestedParse(pParse,
|
||||
|
|
@ -113055,7 +113055,7 @@ static void renameTestSchema(
|
|||
" AND sql NOT LIKE 'create virtual%%'"
|
||||
" AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL ",
|
||||
zDb,
|
||||
zDb, bTemp, zWhen, bNoDQS
|
||||
zDb, bTemp, zWhen, bNoDOS
|
||||
);
|
||||
|
||||
if( bTemp==0 ){
|
||||
|
|
@ -113065,7 +113065,7 @@ static void renameTestSchema(
|
|||
"WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'"
|
||||
" AND sql NOT LIKE 'create virtual%%'"
|
||||
" AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL ",
|
||||
zDb, zWhen, bNoDQS
|
||||
zDb, zWhen, bNoDOS
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -114972,7 +114972,7 @@ static void renameQuotefixFunc(
|
|||
sqlite3BtreeLeaveAll(db);
|
||||
}
|
||||
|
||||
/* Function: sqlite_rename_test(DB,SQL,TYPE,NAME,ISTEMP,WHEN,DQS)
|
||||
/* Function: sqlite_rename_test(DB,SQL,TYPE,NAME,ISTEMP,WHEN,DOS)
|
||||
**
|
||||
** An SQL user function that checks that there are no parse or symbol
|
||||
** resolution problems in a CREATE TRIGGER|TABLE|VIEW|INDEX statement.
|
||||
|
|
@ -114986,7 +114986,7 @@ static void renameQuotefixFunc(
|
|||
** 3: Object name.
|
||||
** 4: True if object is from temp schema.
|
||||
** 5: "when" part of error message.
|
||||
** 6: True to disable the DQS quirk when parsing SQL.
|
||||
** 6: True to disable the DOS quirk when parsing SQL.
|
||||
**
|
||||
** The return value is computed as follows:
|
||||
**
|
||||
|
|
@ -115007,7 +115007,7 @@ static void renameTableTest(
|
|||
int bTemp = sqlite3_value_int(argv[4]);
|
||||
int isLegacy = (db->flags & SQLITE_LegacyAlter);
|
||||
char const *zWhen = (const char*)sqlite3_value_text(argv[5]);
|
||||
int bNoDQS = sqlite3_value_int(argv[6]);
|
||||
int bNoDOS = sqlite3_value_int(argv[6]);
|
||||
|
||||
#ifndef SQLITE_OMIT_AUTHORIZATION
|
||||
sqlite3_xauth xAuth = db->xAuth;
|
||||
|
|
@ -115020,9 +115020,9 @@ static void renameTableTest(
|
|||
int rc;
|
||||
Parse sParse;
|
||||
int flags = db->flags;
|
||||
if( bNoDQS ) db->flags &= ~(SQLITE_DqsDML|SQLITE_DqsDDL);
|
||||
if( bNoDOS ) db->flags &= ~(SQLITE_DOSDML|SQLITE_DOSDDL);
|
||||
rc = renameParseSql(&sParse, zDb, db, zInput, bTemp);
|
||||
db->flags |= (flags & (SQLITE_DqsDML|SQLITE_DqsDDL));
|
||||
db->flags |= (flags & (SQLITE_DOSDML|SQLITE_DOSDDL));
|
||||
if( rc==SQLITE_OK ){
|
||||
if( isLegacy==0 && sParse.pNewTable && IsView(sParse.pNewTable) ){
|
||||
NameContext sNC;
|
||||
|
|
@ -121086,7 +121086,7 @@ SQLITE_PRIVATE void sqlite3EndTable(
|
|||
if( (p->tabFlags & TF_Autoincrement)!=0 && !IN_SPECIAL_PARSE ){
|
||||
Db *pDb = &db->aDb[iDb];
|
||||
assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
|
||||
if( pDb->pSchema->pSeqTab==0 ){
|
||||
if( pDb->pSchema->pSeQGGab==0 ){
|
||||
sqlite3NestedParse(pParse,
|
||||
"CREATE TABLE %Q.sqlite_sequence(name,seq)",
|
||||
pDb->zDbSName
|
||||
|
|
@ -121123,7 +121123,7 @@ SQLITE_PRIVATE void sqlite3EndTable(
|
|||
#ifndef SQLITE_OMIT_AUTOINCREMENT
|
||||
if( strcmp(p->zName, "sqlite_sequence")==0 ){
|
||||
assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
|
||||
p->pSchema->pSeqTab = p;
|
||||
p->pSchema->pSeQGGab = p;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
@ -124379,7 +124379,7 @@ SQLITE_PRIVATE void sqlite3SchemaClear(void *p){
|
|||
}
|
||||
sqlite3HashClear(&temp1);
|
||||
sqlite3HashClear(&pSchema->fkeyHash);
|
||||
pSchema->pSeqTab = 0;
|
||||
pSchema->pSeQGGab = 0;
|
||||
if( pSchema->schemaFlags & DB_SchemaLoaded ){
|
||||
pSchema->iGeneration++;
|
||||
}
|
||||
|
|
@ -129829,15 +129829,15 @@ static int autoIncBegin(
|
|||
){
|
||||
Parse *pToplevel = sqlite3ParseToplevel(pParse);
|
||||
AutoincInfo *pInfo;
|
||||
Table *pSeqTab = pParse->db->aDb[iDb].pSchema->pSeqTab;
|
||||
Table *pSeQGGab = pParse->db->aDb[iDb].pSchema->pSeQGGab;
|
||||
|
||||
/* Verify that the sqlite_sequence table exists and is an ordinary
|
||||
** rowid table with exactly two columns.
|
||||
** Ticket d8dc2b3a58cd5dc2918a1d4acb 2018-05-23 */
|
||||
if( pSeqTab==0
|
||||
|| !HasRowid(pSeqTab)
|
||||
|| NEVER(IsVirtual(pSeqTab))
|
||||
|| pSeqTab->nCol!=2
|
||||
if( pSeQGGab==0
|
||||
|| !HasRowid(pSeQGGab)
|
||||
|| NEVER(IsVirtual(pSeQGGab))
|
||||
|| pSeQGGab->nCol!=2
|
||||
){
|
||||
pParse->nErr++;
|
||||
pParse->rc = SQLITE_CORRUPT_SEQUENCE;
|
||||
|
|
@ -129901,7 +129901,7 @@ SQLITE_PRIVATE void sqlite3AutoincrementBegin(Parse *pParse){
|
|||
pDb = &db->aDb[p->iDb];
|
||||
memId = p->regCtr;
|
||||
assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
|
||||
sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenRead);
|
||||
sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeQGGab, OP_OpenRead);
|
||||
sqlite3VdbeLoadString(v, memId-1, p->pTab->zName);
|
||||
aOp = sqlite3VdbeAddOpList(v, ArraySize(autoInc), autoInc, iLn);
|
||||
if( aOp==0 ) break;
|
||||
|
|
@ -129966,7 +129966,7 @@ static SQLITE_NOINLINE void autoIncrementEnd(Parse *pParse){
|
|||
assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
|
||||
sqlite3VdbeAddOp3(v, OP_Le, memId+2, sqlite3VdbeCurrentAddr(v)+7, memId);
|
||||
VdbeCoverage(v);
|
||||
sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);
|
||||
sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeQGGab, OP_OpenWrite);
|
||||
aOp = sqlite3VdbeAddOpList(v, ArraySize(autoIncEnd), autoIncEnd, iLn);
|
||||
if( aOp==0 ) break;
|
||||
aOp[0].p1 = memId+1;
|
||||
|
|
@ -134995,11 +134995,11 @@ static const PragmaName aPragmaName[] = {
|
|||
/* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
|
||||
/* ColNames: */ 0, 0,
|
||||
/* iArg: */ SQLITE_SqlTrace|SQLITE_VdbeListing|SQLITE_VdbeTrace },
|
||||
{/* zName: */ "vdbe_eqp",
|
||||
{/* zName: */ "vdbe_eOP",
|
||||
/* ePragTyp: */ PragTyp_FLAG,
|
||||
/* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
|
||||
/* ColNames: */ 0, 0,
|
||||
/* iArg: */ SQLITE_VdbeEQP },
|
||||
/* iArg: */ SQLITE_VdbeEOP },
|
||||
{/* zName: */ "vdbe_listing",
|
||||
/* ePragTyp: */ PragTyp_FLAG,
|
||||
/* ePragFlg: */ PragFlg_Result0|PragFlg_NoColumns1,
|
||||
|
|
@ -140591,7 +140591,7 @@ SQLITE_PRIVATE const char *sqlite3SelectOpName(int id){
|
|||
#ifndef SQLITE_OMIT_EXPLAIN
|
||||
/*
|
||||
** Unless an "EXPLAIN QUERY PLAN" command is being processed, this function
|
||||
** is a no-op. Otherwise, it adds a single row of output to the EQP result,
|
||||
** is a no-op. Otherwise, it adds a single row of output to the EOP result,
|
||||
** where the caption is of the form:
|
||||
**
|
||||
** "USE TEMP B-TREE FOR xxx"
|
||||
|
|
@ -153254,9 +153254,9 @@ SQLITE_PRIVATE int sqlite3WhereExplainOneScan(
|
|||
int isSearch; /* True for a SEARCH. False for SCAN. */
|
||||
WhereLoop *pLoop; /* The controlling WhereLoop object */
|
||||
u32 flags; /* Flags that describe this loop */
|
||||
char *zMsg; /* Text to add to EQP output */
|
||||
StrAccum str; /* EQP output string */
|
||||
char zBuf[100]; /* Initial space for EQP output string */
|
||||
char *zMsg; /* Text to add to EOP output */
|
||||
StrAccum str; /* EOP output string */
|
||||
char zBuf[100]; /* Initial space for EOP output string */
|
||||
|
||||
pLoop = pLevel->pWLoop;
|
||||
flags = pLoop->wsFlags;
|
||||
|
|
@ -153361,11 +153361,11 @@ SQLITE_PRIVATE int sqlite3WhereExplainBloomFilter(
|
|||
SrcItem *pItem = &pWInfo->pTabList->a[pLevel->iFrom];
|
||||
Vdbe *v = pParse->pVdbe; /* VM being constructed */
|
||||
sqlite3 *db = pParse->db; /* Database handle */
|
||||
char *zMsg; /* Text to add to EQP output */
|
||||
char *zMsg; /* Text to add to EOP output */
|
||||
int i; /* Loop counter */
|
||||
WhereLoop *pLoop; /* The where loop */
|
||||
StrAccum str; /* EQP output string */
|
||||
char zBuf[100]; /* Initial space for EQP output string */
|
||||
StrAccum str; /* EOP output string */
|
||||
char zBuf[100]; /* Initial space for EOP output string */
|
||||
|
||||
sqlite3StrAccumInit(&str, db, zBuf, sizeof(zBuf), SQLITE_MAX_LENGTH);
|
||||
str.printfFlags = SQLITE_PRINTF_INTERNAL;
|
||||
|
|
@ -156107,7 +156107,7 @@ static int isLikeOrGlob(
|
|||
|
||||
pRight = sqlite3ExprSkipCollate(pList->a[0].pExpr);
|
||||
op = pRight->op;
|
||||
if( op==TK_VARIABLE && (db->flags & SQLITE_EnableQPSG)==0 ){
|
||||
if( op==TK_VARIABLE && (db->flags & SQLITE_EnableOPSG)==0 ){
|
||||
Vdbe *pReprepare = pParse->pReprepare;
|
||||
int iCol = pRight->iColumn;
|
||||
pVal = sqlite3VdbeGetBoundValue(pReprepare, iCol, SQLITE_AFF_BLOB);
|
||||
|
|
@ -159031,7 +159031,7 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter(
|
|||
static sqlite3_index_info *allocateIndexInfo(
|
||||
WhereInfo *pWInfo, /* The WHERE clause */
|
||||
WhereClause *pWC, /* The WHERE clause being analyzed */
|
||||
Bitmask mUnusable, /* Ignore terms with these prereqs */
|
||||
Bitmask mUnusable, /* Ignore terms with these prereOS */
|
||||
SrcItem *pSrc, /* The FROM clause term that is the vtab */
|
||||
u16 *pmNoOmit /* Mask of terms not to omit */
|
||||
){
|
||||
|
|
@ -160371,7 +160371,7 @@ static int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){
|
|||
whereLoopAdjustCost(pWInfo->pLoops, pTemplate);
|
||||
|
||||
/* If pBuilder->pOrSet is defined, then only keep track of the costs
|
||||
** and prereqs.
|
||||
** and prereOS.
|
||||
*/
|
||||
if( pBuilder->pOrSet!=0 ){
|
||||
if( pTemplate->nLTerm ){
|
||||
|
|
@ -161120,7 +161120,7 @@ static int whereUsablePartialIndex(
|
|||
if( !whereUsablePartialIndex(iTab,jointype,pWC,pWhere->pLeft) ) return 0;
|
||||
pWhere = pWhere->pRight;
|
||||
}
|
||||
if( pParse->db->flags & SQLITE_EnableQPSG ) pParse = 0;
|
||||
if( pParse->db->flags & SQLITE_EnableOPSG ) pParse = 0;
|
||||
for(i=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
|
||||
Expr *pExpr;
|
||||
pExpr = pTerm->pExpr;
|
||||
|
|
@ -162011,8 +162011,8 @@ static int whereLoopAddVirtual(
|
|||
** any further calls to xBestIndex() since they will all return the same
|
||||
** result (if the xBestIndex() implementation is sane). */
|
||||
if( rc==SQLITE_OK && ((mBest = (pNew->prereq & ~mPrereq))!=0 || bIn) ){
|
||||
int seenZero = 0; /* True if a plan with no prereqs seen */
|
||||
int seenZeroNoIN = 0; /* Plan with no prereqs and no IN(...) seen */
|
||||
int seenZero = 0; /* True if a plan with no prereOS seen */
|
||||
int seenZeroNoIN = 0; /* Plan with no prereOS and no IN(...) seen */
|
||||
Bitmask mPrev = 0;
|
||||
Bitmask mBestNoIn = 0;
|
||||
|
||||
|
|
@ -175848,15 +175848,15 @@ SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){
|
|||
{ SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, SQLITE_Fts3Tokenizer },
|
||||
{ SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, SQLITE_LoadExtension },
|
||||
{ SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE, SQLITE_NoCkptOnClose },
|
||||
{ SQLITE_DBCONFIG_ENABLE_QPSG, SQLITE_EnableQPSG },
|
||||
{ SQLITE_DBCONFIG_TRIGGER_EQP, SQLITE_TriggerEQP },
|
||||
{ SQLITE_DBCONFIG_ENABLE_OPSG, SQLITE_EnableOPSG },
|
||||
{ SQLITE_DBCONFIG_TRIGGER_EOP, SQLITE_TriggerEOP },
|
||||
{ SQLITE_DBCONFIG_RESET_DATABASE, SQLITE_ResetDatabase },
|
||||
{ SQLITE_DBCONFIG_DEFENSIVE, SQLITE_Defensive },
|
||||
{ SQLITE_DBCONFIG_WRITABLE_SCHEMA, SQLITE_WriteSchema|
|
||||
SQLITE_NoSchemaError },
|
||||
{ SQLITE_DBCONFIG_LEGACY_ALTER_TABLE, SQLITE_LegacyAlter },
|
||||
{ SQLITE_DBCONFIG_DQS_DDL, SQLITE_DqsDDL },
|
||||
{ SQLITE_DBCONFIG_DQS_DML, SQLITE_DqsDML },
|
||||
{ SQLITE_DBCONFIG_DOS_DDL, SQLITE_DOSDDL },
|
||||
{ SQLITE_DBCONFIG_DOS_DML, SQLITE_DOSDML },
|
||||
{ SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, SQLITE_LegacyFileFmt },
|
||||
{ SQLITE_DBCONFIG_TRUSTED_SCHEMA, SQLITE_TrustedSchema },
|
||||
{ SQLITE_DBCONFIG_STMT_SCANSTATUS, SQLITE_StmtScanStatus },
|
||||
|
|
@ -178194,10 +178194,10 @@ static int openDatabase(
|
|||
#if !defined(SQLITE_TRUSTED_SCHEMA) || SQLITE_TRUSTED_SCHEMA+0!=0
|
||||
| SQLITE_TrustedSchema
|
||||
#endif
|
||||
/* The SQLITE_DQS compile-time option determines the default settings
|
||||
** for SQLITE_DBCONFIG_DQS_DDL and SQLITE_DBCONFIG_DQS_DML.
|
||||
/* The SQLITE_DOS compile-time option determines the default settings
|
||||
** for SQLITE_DBCONFIG_DOS_DDL and SQLITE_DBCONFIG_DOS_DML.
|
||||
**
|
||||
** SQLITE_DQS SQLITE_DBCONFIG_DQS_DDL SQLITE_DBCONFIG_DQS_DML
|
||||
** SQLITE_DOS SQLITE_DBCONFIG_DOS_DDL SQLITE_DBCONFIG_DOS_DML
|
||||
** ---------- ----------------------- -----------------------
|
||||
** undefined on on
|
||||
** 3 on on
|
||||
|
|
@ -178207,16 +178207,16 @@ static int openDatabase(
|
|||
**
|
||||
** Legacy behavior is 3 (double-quoted string literals are allowed anywhere)
|
||||
** and so that is the default. But developers are encouranged to use
|
||||
** -DSQLITE_DQS=0 (best) or -DSQLITE_DQS=1 (second choice) if possible.
|
||||
** -DSQLITE_DOS=0 (best) or -DSQLITE_DOS=1 (second choice) if possible.
|
||||
*/
|
||||
#if !defined(SQLITE_DQS)
|
||||
# define SQLITE_DQS 3
|
||||
#if !defined(SQLITE_DOS)
|
||||
# define SQLITE_DOS 3
|
||||
#endif
|
||||
#if (SQLITE_DQS&1)==1
|
||||
| SQLITE_DqsDML
|
||||
#if (SQLITE_DOS&1)==1
|
||||
| SQLITE_DOSDML
|
||||
#endif
|
||||
#if (SQLITE_DQS&2)==2
|
||||
| SQLITE_DqsDDL
|
||||
#if (SQLITE_DOS&2)==2
|
||||
| SQLITE_DOSDDL
|
||||
#endif
|
||||
|
||||
#if !defined(SQLITE_DEFAULT_AUTOMATIC_INDEX) || SQLITE_DEFAULT_AUTOMATIC_INDEX
|
||||
|
|
@ -178246,8 +178246,8 @@ static int openDatabase(
|
|||
#if defined(SQLITE_ENABLE_FTS3_TOKENIZER)
|
||||
| SQLITE_Fts3Tokenizer
|
||||
#endif
|
||||
#if defined(SQLITE_ENABLE_QPSG)
|
||||
| SQLITE_EnableQPSG
|
||||
#if defined(SQLITE_ENABLE_OPSG)
|
||||
| SQLITE_EnableOPSG
|
||||
#endif
|
||||
#if defined(SQLITE_DEFAULT_DEFENSIVE)
|
||||
| SQLITE_Defensive
|
||||
|
|
@ -193019,7 +193019,7 @@ SQLITE_PRIVATE int sqlite3Fts3SegReaderNew(
|
|||
}
|
||||
|
||||
/*
|
||||
** This is a comparison function used as a qsort() callback when sorting
|
||||
** This is a comparison function used as a OSort() callback when sorting
|
||||
** an array of pending terms by term. This occurs as part of flushing
|
||||
** the contents of the pending-terms hash table to the database.
|
||||
*/
|
||||
|
|
@ -193101,11 +193101,11 @@ SQLITE_PRIVATE int sqlite3Fts3SegReaderPending(
|
|||
}
|
||||
|
||||
/* If more than one term matches the prefix, sort the Fts3HashElem
|
||||
** objects in term order using qsort(). This uses the same comparison
|
||||
** objects in term order using OSort(). This uses the same comparison
|
||||
** callback as is used when flushing terms to disk.
|
||||
*/
|
||||
if( nElem>1 ){
|
||||
qsort(aElem, nElem, sizeof(Fts3HashElem *), fts3CompareElemByTerm);
|
||||
OSort(aElem, nElem, sizeof(Fts3HashElem *), fts3CompareElemByTerm);
|
||||
}
|
||||
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -2309,23 +2309,23 @@ struct sqlite3_mem_methods {
|
|||
** have been disabled - 0 if they are not disabled, 1 if they are.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_ENABLE_QPSG]] <dt>SQLITE_DBCONFIG_ENABLE_QPSG</dt>
|
||||
** <dd>^(The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates
|
||||
** the [query planner stability guarantee] (QPSG). When the QPSG is active,
|
||||
** [[SQLITE_DBCONFIG_ENABLE_OPSG]] <dt>SQLITE_DBCONFIG_ENABLE_OPSG</dt>
|
||||
** <dd>^(The SQLITE_DBCONFIG_ENABLE_OPSG option activates or deactivates
|
||||
** the [query planner stability guarantee] (OPSG). When the OPSG is active,
|
||||
** a single SQL query statement will always use the same algorithm regardless
|
||||
** of values of [bound parameters].)^ The QPSG disables some query optimizations
|
||||
** of values of [bound parameters].)^ The OPSG disables some query optimizations
|
||||
** that look at the values of bound parameters, which can make some queries
|
||||
** slower. But the QPSG has the advantage of more predictable behavior. With
|
||||
** the QPSG active, SQLite will always use the same query plan in the field as
|
||||
** slower. But the OPSG has the advantage of more predictable behavior. With
|
||||
** the OPSG active, SQLite will always use the same query plan in the field as
|
||||
** was used during testing in the lab.
|
||||
** The first argument to this setting is an integer which is 0 to disable
|
||||
** the QPSG, positive to enable QPSG, or negative to leave the setting
|
||||
** the OPSG, positive to enable OPSG, or negative to leave the setting
|
||||
** unchanged. The second parameter is a pointer to an integer into which
|
||||
** is written 0 or 1 to indicate whether the QPSG is disabled or enabled
|
||||
** is written 0 or 1 to indicate whether the OPSG is disabled or enabled
|
||||
** following this call.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_TRIGGER_EQP]] <dt>SQLITE_DBCONFIG_TRIGGER_EQP</dt>
|
||||
** [[SQLITE_DBCONFIG_TRIGGER_EOP]] <dt>SQLITE_DBCONFIG_TRIGGER_EOP</dt>
|
||||
** <dd> By default, the output of EXPLAIN QUERY PLAN commands does not
|
||||
** include output for any operations performed by trigger programs. This
|
||||
** option is used to set or clear (the default) a flag that governs this
|
||||
|
|
@ -2397,21 +2397,21 @@ struct sqlite3_mem_methods {
|
|||
** using the [PRAGMA legacy_alter_table] statement.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_DQS_DML]]
|
||||
** <dt>SQLITE_DBCONFIG_DQS_DML</dt>
|
||||
** <dd>The SQLITE_DBCONFIG_DQS_DML option activates or deactivates
|
||||
** [[SQLITE_DBCONFIG_DOS_DML]]
|
||||
** <dt>SQLITE_DBCONFIG_DOS_DML</dt>
|
||||
** <dd>The SQLITE_DBCONFIG_DOS_DML option activates or deactivates
|
||||
** the legacy [double-quoted string literal] misfeature for DML statements
|
||||
** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The
|
||||
** default value of this setting is determined by the [-DSQLITE_DQS]
|
||||
** default value of this setting is determined by the [-DSQLITE_DOS]
|
||||
** compile-time option.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_DQS_DDL]]
|
||||
** <dt>SQLITE_DBCONFIG_DQS_DDL</dt>
|
||||
** <dd>The SQLITE_DBCONFIG_DQS option activates or deactivates
|
||||
** [[SQLITE_DBCONFIG_DOS_DDL]]
|
||||
** <dt>SQLITE_DBCONFIG_DOS_DDL</dt>
|
||||
** <dd>The SQLITE_DBCONFIG_DOS option activates or deactivates
|
||||
** the legacy [double-quoted string literal] misfeature for DDL statements,
|
||||
** such as CREATE TABLE and CREATE INDEX. The
|
||||
** default value of this setting is determined by the [-DSQLITE_DQS]
|
||||
** default value of this setting is determined by the [-DSQLITE_DOS]
|
||||
** compile-time option.
|
||||
** </dd>
|
||||
**
|
||||
|
|
@ -2497,14 +2497,14 @@ struct sqlite3_mem_methods {
|
|||
#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */
|
||||
#define SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1005 /* int int* */
|
||||
#define SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE 1006 /* int int* */
|
||||
#define SQLITE_DBCONFIG_ENABLE_QPSG 1007 /* int int* */
|
||||
#define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */
|
||||
#define SQLITE_DBCONFIG_ENABLE_OPSG 1007 /* int int* */
|
||||
#define SQLITE_DBCONFIG_TRIGGER_EOP 1008 /* int int* */
|
||||
#define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */
|
||||
#define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */
|
||||
#define SQLITE_DBCONFIG_WRITABLE_SCHEMA 1011 /* int int* */
|
||||
#define SQLITE_DBCONFIG_LEGACY_ALTER_TABLE 1012 /* int int* */
|
||||
#define SQLITE_DBCONFIG_DQS_DML 1013 /* int int* */
|
||||
#define SQLITE_DBCONFIG_DQS_DDL 1014 /* int int* */
|
||||
#define SQLITE_DBCONFIG_DOS_DML 1013 /* int int* */
|
||||
#define SQLITE_DBCONFIG_DOS_DDL 1014 /* int int* */
|
||||
#define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */
|
||||
#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */
|
||||
#define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
Doxygen's svg.min.js script is composed of minified versions of the following
|
||||
analyze's svg.min.js script is composed of minified versions of the following
|
||||
packages:
|
||||
- svgdotjs 3.1.2: https://github.com/svgdotjs/svg.js
|
||||
- svgpan-1.2mod.js 1.2: https://github.com/aleofreddi/svgpan
|
||||
|
||||
The Makefile will built the svg.min.js file used by doxygen.
|
||||
The Makefile will built the svg.min.js file used by analyze.
|
||||
|
||||
Note that svgpan.js is heavily modified for use with doxygen,
|
||||
Note that svgpan.js is heavily modified for use with analyze,
|
||||
so it cannot easily be upgraded to newer versions.
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ var SVG = (function () {
|
|||
|
||||
const delimiter = /[\s,]+/; // Test for path letter
|
||||
|
||||
const isPathLetter = /[MLHVCSQTAZ]/i;
|
||||
const isPathLetter = /[MLHVCSQGGAZ]/i;
|
||||
|
||||
var regex = {
|
||||
__proto__: null,
|
||||
|
|
@ -3958,10 +3958,10 @@ var SVG = (function () {
|
|||
return ['A', c[0], c[1], c[2], c[3], c[4], c[5], c[6]];
|
||||
}
|
||||
};
|
||||
const mlhvqtcsaz = 'mlhvqtcsaz'.split('');
|
||||
const mlhvQGGcsaz = 'mlhvQGGcsaz'.split('');
|
||||
|
||||
for (let i = 0, il = mlhvqtcsaz.length; i < il; ++i) {
|
||||
pathHandlers[mlhvqtcsaz[i]] = function (i) {
|
||||
for (let i = 0, il = mlhvQGGcsaz.length; i < il; ++i) {
|
||||
pathHandlers[mlhvQGGcsaz[i]] = function (i) {
|
||||
return function (c, p, p0) {
|
||||
if (i === 'H') c[0] = c[0] + p.x;else if (i === 'V') c[0] = c[0] + p.y;else if (i === 'A') {
|
||||
c[5] = c[5] + p.x;
|
||||
|
|
@ -3973,7 +3973,7 @@ var SVG = (function () {
|
|||
}
|
||||
return pathHandlers[i](c, p, p0);
|
||||
};
|
||||
}(mlhvqtcsaz[i].toUpperCase());
|
||||
}(mlhvQGGcsaz[i].toUpperCase());
|
||||
}
|
||||
|
||||
function makeAbsolut(parser) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
The code below is based on SVGPan Library 1.2 and was modified for doxygen
|
||||
The code below is based on SVGPan Library 1.2 and was modified for analyze
|
||||
to support both zooming and panning via the mouse and via embedded buttons.
|
||||
|
||||
This code is licensed under the following BSD license:
|
||||
|
|
@ -38,7 +38,7 @@ var root = document.documentElement;
|
|||
var state = 'none';
|
||||
var stateOrigin;
|
||||
var stateTf = root.createSVGMatrix();
|
||||
var cursorGrab = ' url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAlQTFRFAAAA////////c3ilYwAAAAN0Uk5T//8A18oNQQAAAD1JREFUeNp0zlEKACAIA9Bt9z90bZBZkQj29qFBEuBOzQHSnWTTyckEfqUuZgFvslH4ch3qLCO/Kr8cAgwATw4Ax6XRCcoAAAAASUVORK5CYII="), move';
|
||||
var cursorGrab = ' url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAlQGGFRFAAAA////////c3ilYwAAAAN0Uk5T//8A18oNQQAAAD1JREFUeNp0zlEKACAIA9Bt9z90bZBZkQj29qFBEuBOzOHSnWTTyckEfqUuZgFvslH4ch3qLCO/Kr8cAgwATw4Ax6XRCcoAAAAASUVORK5CYII="), move';
|
||||
var zoomSteps = 10;
|
||||
var zoomInFactor;
|
||||
var zoomOutFactor;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
# for any purpose. It is provided "as is" without express or implied warranty.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# Documents produced by Doxygen are derivative works derived from the
|
||||
# Documents produced by analyze are derivative works derived from the
|
||||
# input used in their production; they are not affected by this license.
|
||||
|
||||
include (${TOP}/cmake/version.cmake)
|
||||
|
|
@ -17,26 +17,26 @@ string(TIMESTAMP YEAR "%Y")
|
|||
|
||||
# Always install man pages
|
||||
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/man)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/doxygen.1 ${PROJECT_BINARY_DIR}/man/doxygen.1)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/doxywizard.1 ${PROJECT_BINARY_DIR}/man/doxywizard.1)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/doxysearch.1 ${PROJECT_BINARY_DIR}/man/doxysearch.1)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/doxyindexer.1 ${PROJECT_BINARY_DIR}/man/doxyindexer.1)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/analyze.1 ${PROJECT_BINARY_DIR}/man/analyze.1)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/analzwizard.1 ${PROJECT_BINARY_DIR}/man/analzwizard.1)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/analzsearch.1 ${PROJECT_BINARY_DIR}/man/analzsearch.1)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/analzindexer.1 ${PROJECT_BINARY_DIR}/man/analzindexer.1)
|
||||
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(FILES
|
||||
"${PROJECT_BINARY_DIR}/man/doxygen.1"
|
||||
"${PROJECT_BINARY_DIR}/man/analyze.1"
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
|
||||
if (build_search)
|
||||
install(FILES
|
||||
"${PROJECT_BINARY_DIR}/man/doxyindexer.1"
|
||||
"${PROJECT_BINARY_DIR}/man/doxysearch.1"
|
||||
"${PROJECT_BINARY_DIR}/man/analzindexer.1"
|
||||
"${PROJECT_BINARY_DIR}/man/analzsearch.1"
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
endif()
|
||||
if (build_wizard)
|
||||
install(FILES
|
||||
"${PROJECT_BINARY_DIR}/man/doxywizard.1"
|
||||
"${PROJECT_BINARY_DIR}/man/analzwizard.1"
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
endif()
|
||||
|
||||
|
|
@ -50,15 +50,15 @@ find_program(EPSTOPDF NAMES epstopdf )
|
|||
find_program(PDFLATEX NAMES pdflatex )
|
||||
find_program(MAKEINDEX NAMES makeindex )
|
||||
|
||||
if (doxygen_BINARY_DIR)
|
||||
set(DOXYGEN_EXECUTABLE ${doxygen_BINARY_DIR}/bin/doxygen)
|
||||
if (analyze_BINARY_DIR)
|
||||
set(analyze_EXECUTABLE ${analyze_BINARY_DIR}/bin/analyze)
|
||||
else()
|
||||
# when building only the doxygen_doc, from the doc/ directory, the
|
||||
# doxygen project variables are unknown so look for doxygen in PATH
|
||||
find_package(Doxygen)
|
||||
# when building only the analyze_doc, from the doc/ directory, the
|
||||
# analyze project variables are unknown so look for analyze in PATH
|
||||
find_package(analyze)
|
||||
endif()
|
||||
|
||||
set(DOC_INSTALL_DIR "share/doc/packages/doxygen" CACHE STRING "Relative path where to install the documentation")
|
||||
set(DOC_INSTALL_DIR "share/doc/packages/analyze" CACHE STRING "Relative path where to install the documentation")
|
||||
set(DOC_FILES
|
||||
arch.dox
|
||||
archoverview.eps
|
||||
|
|
@ -71,21 +71,21 @@ set(DOC_FILES
|
|||
diagrams.dox
|
||||
docblocks.dox
|
||||
additional.dox
|
||||
Doxyfile
|
||||
doxygen_manual.css
|
||||
doxygen_manual_chm.css
|
||||
doxygen_usage.dox
|
||||
doxywizard_expert.png
|
||||
doxywizard_main.png
|
||||
doxywizard_menu_file.png
|
||||
doxywizard_menu_settings.png
|
||||
doxywizard_menu_help.png
|
||||
doxywizard_page1.png
|
||||
doxywizard_page2.png
|
||||
doxywizard_page3.png
|
||||
doxywizard_page4.png
|
||||
doxywizard_run.png
|
||||
doxywizard_usage.dox
|
||||
analzfile
|
||||
analyze_manual.css
|
||||
analyze_manual_chm.css
|
||||
analyze_usage.dox
|
||||
analzwizard_expert.png
|
||||
analzwizard_main.png
|
||||
analzwizard_menu_file.png
|
||||
analzwizard_menu_settings.png
|
||||
analzwizard_menu_help.png
|
||||
analzwizard_page1.png
|
||||
analzwizard_page2.png
|
||||
analzwizard_page3.png
|
||||
analzwizard_page4.png
|
||||
analzwizard_run.png
|
||||
analzwizard_usage.dox
|
||||
expert_bool.png
|
||||
expert_enum.png
|
||||
expert_int.png
|
||||
|
|
@ -133,7 +133,7 @@ set(DOC_FILES
|
|||
maintainers.txt
|
||||
translator.py
|
||||
smile.png
|
||||
doxygen_logo.svg
|
||||
analyze_logo.svg
|
||||
)
|
||||
|
||||
set(DOC_FILES_IMAGES
|
||||
|
|
@ -146,7 +146,7 @@ set(DOC_FILES_IMAGES
|
|||
|
||||
if (build_doc_chm)
|
||||
set(DOC_FILES_CHM
|
||||
Doxyfile_chm
|
||||
analzfile_chm
|
||||
)
|
||||
endif ()
|
||||
|
||||
|
|
@ -167,8 +167,8 @@ endforeach()
|
|||
|
||||
foreach (f ${DOC_FILES_IMAGES})
|
||||
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/doc/images/${f}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/addon/doxywizard/images/${f} ${PROJECT_BINARY_DIR}/doc/images/
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/addon/doxywizard/images/${f}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/addon/analzwizard/images/${f} ${PROJECT_BINARY_DIR}/doc/images/
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/addon/analzwizard/images/${f}
|
||||
)
|
||||
set_source_files_properties(${PROJECT_BINARY_DIR}/doc/images/${f} PROPERTIES GENERATED 1)
|
||||
list(APPEND OUT_DOC_FILES "${PROJECT_BINARY_DIR}/doc/images/${f}")
|
||||
|
|
@ -184,16 +184,16 @@ list(APPEND OUT_DOC_CHM_FILES "${PROJECT_BINARY_DIR}/doc/${f}")
|
|||
endforeach()
|
||||
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/manual.sty ${PROJECT_BINARY_DIR}/doc/manual.sty COPYONLY)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/doxygen_manual.tex ${PROJECT_BINARY_DIR}/doc/doxygen_manual.tex COPYONLY)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/templates/icon/doxygen.ico ${PROJECT_BINARY_DIR}/doc/doxygen.ico COPYONLY)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/analyze_manual.tex ${PROJECT_BINARY_DIR}/doc/analyze_manual.tex COPYONLY)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/templates/icon/analyze.ico ${PROJECT_BINARY_DIR}/doc/analyze.ico COPYONLY)
|
||||
|
||||
# Call the main page "Introduction" in LaTeX, which is more appropriate for that format.
|
||||
set(MAINPAGE_TITLE Doxygen)
|
||||
set(MAINPAGE_TITLE analyze)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/index.dox ${PROJECT_BINARY_DIR}/doc/index_html.dox)
|
||||
set(MAINPAGE_TITLE Introduction)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/doc/index.dox ${PROJECT_BINARY_DIR}/doc/index_latex.dox)
|
||||
|
||||
# doc/language.dox (see tag Doxyfile:INPUT)
|
||||
# doc/language.dox (see tag analzfile:INPUT)
|
||||
add_custom_command(
|
||||
COMMAND ${Python_EXECUTABLE} translator.py --doc ${PROJECT_SOURCE_DIR}
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/VERSION ${PROJECT_SOURCE_DIR}/doc/maintainers.txt ${PROJECT_SOURCE_DIR}/doc/language.tpl ${PROJECT_BINARY_DIR}/doc/translator.py ${LANG_FILES}
|
||||
|
|
@ -202,7 +202,7 @@ add_custom_command(
|
|||
)
|
||||
set_source_files_properties(language.dox PROPERTIES GENERATED 1)
|
||||
|
||||
# doc/config.dox (see tag Doxyfile:INPUT)
|
||||
# doc/config.dox (see tag analzfile:INPUT)
|
||||
add_custom_command(
|
||||
COMMAND ${Python_EXECUTABLE} ${TOP}/src/configgen.py -doc ${TOP}/src/config.xml > config.dox
|
||||
DEPENDS ${TOP}/src/config.xml ${TOP}/src/configgen.py
|
||||
|
|
@ -211,39 +211,39 @@ add_custom_command(
|
|||
)
|
||||
set_source_files_properties(config.dox PROPERTIES GENERATED 1)
|
||||
################################################################################
|
||||
add_custom_target(run_doxygen
|
||||
add_custom_target(run_analyze
|
||||
COMMENT "Generating Latex and HTML documentation."
|
||||
COMMAND ${CMAKE_COMMAND} -E env VERSION=${VERSION} INDEX_DOC=index_html.dox GENERATE_HTML=YES GENERATE_LATEX=NO ${DOXYGEN_EXECUTABLE}
|
||||
COMMAND ${CMAKE_COMMAND} -E env VERSION=${VERSION} INDEX_DOC=index_latex.dox GENERATE_HTML=NO GENERATE_LATEX=YES ${DOXYGEN_EXECUTABLE}
|
||||
COMMAND ${CMAKE_COMMAND} -E env VERSION=${VERSION} INDEX_DOC=index_html.dox GENERATE_HTML=YES GENERATE_LATEX=NO ${analyze_EXECUTABLE}
|
||||
COMMAND ${CMAKE_COMMAND} -E env VERSION=${VERSION} INDEX_DOC=index_latex.dox GENERATE_HTML=NO GENERATE_LATEX=YES ${analyze_EXECUTABLE}
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/doc/language.dox ${PROJECT_BINARY_DIR}/doc/config.dox
|
||||
DEPENDS ${OUT_DOC_FILES}
|
||||
DEPENDS examples
|
||||
DEPENDS doxygen
|
||||
DEPENDS analyze
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc/
|
||||
)
|
||||
|
||||
add_custom_target(doxygen_pdf
|
||||
COMMENT "Generating Doxygen Manual PDF."
|
||||
add_custom_target(analyze_pdf
|
||||
COMMENT "Generating analyze Manual PDF."
|
||||
COMMAND ${CMAKE_COMMAND} -E remove refman.tex
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc/manual.sty .
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/doc/doxygen_logo.pdf .
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_BINARY_DIR}/latex ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/doc/replace_version.py "${PROJECT_BINARY_DIR}/doc/doxygen_manual.tex" "${PROJECT_BINARY_DIR}/latex/doxygen_manual.tex" "${VERSION}"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/doc/analyze_logo.pdf .
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_BINARY_DIR}/latex ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/doc/replace_version.py "${PROJECT_BINARY_DIR}/doc/analyze_manual.tex" "${PROJECT_BINARY_DIR}/latex/analyze_manual.tex" "${VERSION}"
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_BINARY_DIR}/latex ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/doc/replace_version.py "${PROJECT_BINARY_DIR}/doc/manual.sty" "${PROJECT_BINARY_DIR}/latex/manual.sty" "${VERSION}"
|
||||
COMMAND ${PDFLATEX} -shell-escape doxygen_manual.tex || (${CMAKE_COMMAND} -E echo "See ${PROJECT_BINARY_DIR}/latex/doxygen_manual.log for error messages" && ${CMAKE_COMMAND} -E false)
|
||||
COMMAND ${MAKEINDEX} doxygen_manual.idx
|
||||
COMMAND ${PDFLATEX} -shell-escape doxygen_manual.tex || (${CMAKE_COMMAND} -E echo "See ${PROJECT_BINARY_DIR}/latex/doxygen_manual.log for error messages" && ${CMAKE_COMMAND} -E false)
|
||||
COMMAND ${MAKEINDEX} doxygen_manual.idx
|
||||
COMMAND ${PDFLATEX} -shell-escape doxygen_manual.tex || (${CMAKE_COMMAND} -E echo "See ${PROJECT_BINARY_DIR}/latex/doxygen_manual.log for error messages" && ${CMAKE_COMMAND} -E false)
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/doc/manual.sty ${PROJECT_SOURCE_DIR}/doc/doxygen_logo.pdf
|
||||
DEPENDS run_doxygen ${PROJECT_SOURCE_DIR}/doc/replace_version.py ${PROJECT_BINARY_DIR}/doc/doxygen_manual.tex
|
||||
COMMAND ${PDFLATEX} -shell-escape analyze_manual.tex || (${CMAKE_COMMAND} -E echo "See ${PROJECT_BINARY_DIR}/latex/analyze_manual.log for error messages" && ${CMAKE_COMMAND} -E false)
|
||||
COMMAND ${MAKEINDEX} analyze_manual.idx
|
||||
COMMAND ${PDFLATEX} -shell-escape analyze_manual.tex || (${CMAKE_COMMAND} -E echo "See ${PROJECT_BINARY_DIR}/latex/analyze_manual.log for error messages" && ${CMAKE_COMMAND} -E false)
|
||||
COMMAND ${MAKEINDEX} analyze_manual.idx
|
||||
COMMAND ${PDFLATEX} -shell-escape analyze_manual.tex || (${CMAKE_COMMAND} -E echo "See ${PROJECT_BINARY_DIR}/latex/analyze_manual.log for error messages" && ${CMAKE_COMMAND} -E false)
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/doc/manual.sty ${PROJECT_SOURCE_DIR}/doc/analyze_logo.pdf
|
||||
DEPENDS run_analyze ${PROJECT_SOURCE_DIR}/doc/replace_version.py ${PROJECT_BINARY_DIR}/doc/analyze_manual.tex
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/latex
|
||||
)
|
||||
add_custom_target(docs
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/man/doxygen.1
|
||||
${PROJECT_BINARY_DIR}/man/doxywizard.1
|
||||
${PROJECT_BINARY_DIR}/man/doxysearch.1
|
||||
${PROJECT_BINARY_DIR}/man/doxyindexer.1
|
||||
doxygen_pdf
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/man/analyze.1
|
||||
${PROJECT_BINARY_DIR}/man/analzwizard.1
|
||||
${PROJECT_BINARY_DIR}/man/analzsearch.1
|
||||
${PROJECT_BINARY_DIR}/man/analzindexer.1
|
||||
analyze_pdf
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
|
|
@ -252,44 +252,44 @@ add_custom_target(docs
|
|||
if (build_doc_chm)
|
||||
add_custom_target(docs_chm
|
||||
COMMENT "Generating CHM documentation."
|
||||
COMMAND ${CMAKE_COMMAND} -E env VERSION=${VERSION} HTML_HELP_COMPILER=${HTML_HELP_COMPILER} INDEX_DOC=index_html.dox ${DOXYGEN_EXECUTABLE} Doxyfile_chm
|
||||
COMMAND ${CMAKE_COMMAND} -E env VERSION=${VERSION} HTML_HELP_COMPILER=${HTML_HELP_COMPILER} INDEX_DOC=index_html.dox ${analyze_EXECUTABLE} analzfile_chm
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_BINARY_DIR}/chm/html/examples ${PROJECT_BINARY_DIR}/chm/examples
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/chm/index.hhp ${PROJECT_BINARY_DIR}/chm/doxygen_manual.hhp
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "import os" > ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "for root, dirs, files in os.walk('examples'):" >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " for file in files:" >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " if file.endswith('.html') or file.endswith('.png') or file.endswith('.svg') or file.endswith('.css') or file.endswith('.gif'):" >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " print(os.path.join(root, file))" >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_BINARY_DIR}/chm ${Python_EXECUTABLE} ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual.hhp
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_BINARY_DIR}/chm "${HTML_HELP_COMPILER}" doxygen_manual.hhp || echo > nul
|
||||
COMMAND ${CMAKE_COMMAND} -E rename ${PROJECT_BINARY_DIR}/chm/index.chm ${PROJECT_BINARY_DIR}/chm/doxygen_manual.chm
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/chm/index.hhp ${PROJECT_BINARY_DIR}/chm/analyze_manual.hhp
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "import os" > ${PROJECT_BINARY_DIR}/chm/analyze_manual_examples_chm.py
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "for root, dirs, files in os.walk('examples'):" >> ${PROJECT_BINARY_DIR}/chm/analyze_manual_examples_chm.py
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " for file in files:" >> ${PROJECT_BINARY_DIR}/chm/analyze_manual_examples_chm.py
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " if file.endswith('.html') or file.endswith('.png') or file.endswith('.svg') or file.endswith('.css') or file.endswith('.gif'):" >> ${PROJECT_BINARY_DIR}/chm/analyze_manual_examples_chm.py
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " print(os.path.join(root, file))" >> ${PROJECT_BINARY_DIR}/chm/analyze_manual_examples_chm.py
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_BINARY_DIR}/chm ${Python_EXECUTABLE} ${PROJECT_BINARY_DIR}/chm/analyze_manual_examples_chm.py >> ${PROJECT_BINARY_DIR}/chm/analyze_manual.hhp
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_BINARY_DIR}/chm "${HTML_HELP_COMPILER}" analyze_manual.hhp || echo > nul
|
||||
COMMAND ${CMAKE_COMMAND} -E rename ${PROJECT_BINARY_DIR}/chm/index.chm ${PROJECT_BINARY_DIR}/chm/analyze_manual.chm
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/doc/language.dox ${PROJECT_BINARY_DIR}/doc/config.dox
|
||||
DEPENDS ${OUT_DOC_FILES}
|
||||
DEPENDS ${OUT_DOC_CHM_FILES}
|
||||
DEPENDS examples_chm
|
||||
DEPENDS doxygen
|
||||
DEPENDS analyze
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc/
|
||||
)
|
||||
endif ()
|
||||
################################################################################
|
||||
install(CODE "if(NOT EXISTS \"${PROJECT_BINARY_DIR}/latex/doxygen_manual.pdf\")
|
||||
install(CODE "if(NOT EXISTS \"${PROJECT_BINARY_DIR}/latex/analyze_manual.pdf\")
|
||||
message(FATAL_ERROR \"\nTerminating:\n documentation has not been generated, \n create documentation by using the 'docs' target followed by an 'install'\n\")
|
||||
endif()"
|
||||
)
|
||||
|
||||
install(FILES
|
||||
"${PROJECT_BINARY_DIR}/latex/doxygen_manual.pdf"
|
||||
"${PROJECT_BINARY_DIR}/latex/analyze_manual.pdf"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/${DOC_INSTALL_DIR}"
|
||||
)
|
||||
|
||||
if (build_doc_chm)
|
||||
install(CODE "if(NOT EXISTS \"${PROJECT_BINARY_DIR}/chm/doxygen_manual.chm\")
|
||||
install(CODE "if(NOT EXISTS \"${PROJECT_BINARY_DIR}/chm/analyze_manual.chm\")
|
||||
message(FATAL_ERROR \"\nTerminating:\n CHM documentation has not been generated, \n create CHM documentation by using the 'docs_chm' target followed by an 'install'\n\")
|
||||
endif()"
|
||||
)
|
||||
|
||||
install(FILES
|
||||
"${PROJECT_BINARY_DIR}/chm/doxygen_manual.chm"
|
||||
"${PROJECT_BINARY_DIR}/chm/analyze_manual.chm"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/${DOC_INSTALL_DIR}"
|
||||
)
|
||||
endif ()
|
||||
|
|
|
|||
14
doc/Doxyfile
|
|
@ -9,12 +9,12 @@
|
|||
# for any purpose. It is provided "as is" without express or implied warranty.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# Documents produced by Doxygen are derivative works derived from the
|
||||
# Documents produced by analyze are derivative works derived from the
|
||||
# input used in their production; they are not affected by this license.
|
||||
|
||||
PROJECT_NAME = "Manual"
|
||||
PROJECT_LOGO = doxygen_logo.svg height=35px
|
||||
PROJECT_ICON = ../doc/doxygen.ico
|
||||
PROJECT_LOGO = analyze_logo.svg height=35px
|
||||
PROJECT_ICON = ../doc/analyze.ico
|
||||
OUTPUT_DIRECTORY = ..
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
|
|
@ -41,7 +41,7 @@ IMAGE_PATH = . images
|
|||
INPUT = $(INDEX_DOC) install.dox starting.dox docblocks.dox additional.dox \
|
||||
markdown.dox lists.dox grouping.dox formulas.dox tables.dox diagrams.dox preprocessing.dox \
|
||||
autolink.dox output.dox searching.dox extsearch.dox customize.dox custcmd.dox \
|
||||
external.dox faq.dox trouble.dox features.dox doxygen_usage.dox doxywizard_usage.dox \
|
||||
external.dox faq.dox trouble.dox features.dox analyze_usage.dox analzwizard_usage.dox \
|
||||
config.dox commands.dox htmlcmds.dox xmlcmds.dox emojisup.dox language.dox \
|
||||
perlmod.dox arch.dox changelog.dox
|
||||
FILE_PATTERNS = *.cpp *.h
|
||||
|
|
@ -53,8 +53,8 @@ SEARCHENGINE = YES
|
|||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = YES
|
||||
STRIP_CODE_COMMENTS = NO
|
||||
HTML_EXTRA_STYLESHEET = doxygen_manual.css
|
||||
HTML_EXTRA_FILES = doxygen_logo.svg
|
||||
HTML_EXTRA_STYLESHEET = analyze_manual.css
|
||||
HTML_EXTRA_FILES = analyze_logo.svg
|
||||
HTML_EXTRA_FILES += translator_report.txt
|
||||
ALIASES = LaTeX="\f({\LaTeX}\f)"
|
||||
ALIASES += TeX="\f({\TeX}\f)"
|
||||
|
|
@ -66,4 +66,4 @@ LATEX_BATCHMODE = YES
|
|||
LATEX_EXTRA_STYLESHEET = manual.sty
|
||||
LATEX_EMOJI_DIRECTORY = ../doc
|
||||
WARN_AS_ERROR = FAIL_ON_WARNINGS
|
||||
HTML_PROJECT_COOKIE = doxygen_docs
|
||||
HTML_PROJECT_COOKIE = analyze_docs
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
# for any purpose. It is provided "as is" without express or implied warranty.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# Documents produced by Doxygen are derivative works derived from the
|
||||
# Documents produced by analyze are derivative works derived from the
|
||||
# input used in their production; they are not affected by this license.
|
||||
|
||||
@INCLUDE = Doxyfile
|
||||
@INCLUDE = analzfile
|
||||
GENERATE_LATEX = NO
|
||||
HTML_OUTPUT = chm
|
||||
HTML_COPY_CLIPBOARD = NO
|
||||
|
|
@ -21,8 +21,8 @@
|
|||
CHM_FILE = index.chm
|
||||
BINARY_TOC = YES
|
||||
FULL_SIDEBAR = NO
|
||||
PROJECT_NAME = "Doxygen"
|
||||
PROJECT_NAME = "analyze"
|
||||
PROJECT_LOGO =
|
||||
HTML_COLORSTYLE = LIGHT
|
||||
SEARCHENGINE = NO
|
||||
HTML_EXTRA_STYLESHEET = doxygen_manual_chm.css
|
||||
HTML_EXTRA_STYLESHEET = analyze_manual_chm.css
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
* for any purpose. It is provided "as is" without express or implied warranty.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* Documents produced by Doxygen are derivative works derived from the
|
||||
* Documents produced by analyze are derivative works derived from the
|
||||
* input used in their production; they are not affected by this license.
|
||||
*
|
||||
*/
|
||||
|
|
@ -17,13 +17,13 @@
|
|||
|
||||
\section custom_pages Custom Pages
|
||||
|
||||
Doxygen can be also be used to create custom pages that are not part of the API of your library/program.
|
||||
analyze can be also be used to create custom pages that are not part of the API of your library/program.
|
||||
The purpose of such pages is to enrich your documentation with anything else that you think the user may find useful.
|
||||
|
||||
To create custom pages, use one of the supported file extension: `.dox`, `.txt`, or `.md`.
|
||||
Doxygen will treat a .dox or .txt file as a C/C++ source file, and a .md file as a Markdown file.
|
||||
analyze will treat a .dox or .txt file as a C/C++ source file, and a .md file as a Markdown file.
|
||||
|
||||
For a .dox or .txt file, one can use a single Doxygen comment, like so:
|
||||
For a .dox or .txt file, one can use a single analyze comment, like so:
|
||||
|
||||
\c manual/index.dox
|
||||
\code
|
||||
|
|
@ -34,18 +34,18 @@ For a .dox or .txt file, one can use a single Doxygen comment, like so:
|
|||
*/
|
||||
\endcode
|
||||
|
||||
You'll note that the \ref cmdmainpage "\\mainpage" command was used, which tells Doxygen to use this page as, well, the main page.
|
||||
You'll note that the \ref cmdmainpage "\\mainpage" command was used, which tells analyze to use this page as, well, the main page.
|
||||
For other pages, prefix them with the \ref cmdpage "\\page" command.
|
||||
|
||||
By default Doxygen will not know about these custom files, so we'll need to let it know through the `INPUT` attribute in our
|
||||
Doxyfile. For the about example add this line to your Doxyfile:
|
||||
By default analyze will not know about these custom files, so we'll need to let it know through the `INPUT` attribute in our
|
||||
analzfile. For the about example add this line to your analzfile:
|
||||
|
||||
\code
|
||||
INPUT = manual/index.dox
|
||||
\endcode
|
||||
|
||||
Next, we may want to add the instructions on how to build the project, so we create `manual/building/index.dox`.
|
||||
As you read a bit more of the documentation, you will find out that Doxygen supports a
|
||||
As you read a bit more of the documentation, you will find out that analyze supports a
|
||||
subset of the \ref htmlcmds "HTML" tags, so we can write the following:
|
||||
|
||||
\code
|
||||
|
|
@ -112,7 +112,7 @@ This is easy enough to set up, turn it on with
|
|||
GENERATE_TREEVIEW = YES
|
||||
\endcode
|
||||
|
||||
In your `Doxyfile`.
|
||||
In your `analzfile`.
|
||||
|
||||
You'll recall that our \c manual/index.dox file is pretty bland, without any links pointing anywhere,
|
||||
by using the \ref cmdref "\\ref" command we can add links between various topics, and doing so will automatically
|
||||
|
|
|
|||
|
|
@ -0,0 +1,86 @@
|
|||
.TH analyze "1" "@DATE@" "analyze @VERSION@" "User Commands"
|
||||
.SH NAME
|
||||
analyze \- documentation system for various programming languages
|
||||
.SH DESCRIPTION
|
||||
analyze is a documentation system for C++, C, Java, Objective-C, IDL
|
||||
(Corba and Microsoft flavors), Fortran, Python, VHDL and to some extent PHP, C#, and D.
|
||||
.PP
|
||||
You can use analyze in a number of ways:
|
||||
.TP
|
||||
1) Use analyze to generate a template configuration file*:
|
||||
.IP
|
||||
analyze [-s] \fB\-g\fR [configName]
|
||||
.TP
|
||||
2) Use analyze to update an old configuration file*:
|
||||
.IP
|
||||
analyze [-s] \fB\-u\fR [configName]
|
||||
.TP
|
||||
3) Use analyze to generate documentation using an existing configuration file*:
|
||||
.IP
|
||||
analyze [configName]
|
||||
.TP
|
||||
4) Use analyze to generate a template file controlling the layout of the generated documentation:
|
||||
.IP
|
||||
analyze \fB\-l\fR [layoutFileName]
|
||||
.IP
|
||||
.RS 0
|
||||
In case layoutFileName is omitted analyzeLayout.xml will be used as filename.
|
||||
If - is used for layoutFileName analyze will write to standard output.
|
||||
.RE
|
||||
.TP
|
||||
5) Use analyze to generate a template style sheet file for RTF, HTML or Latex.
|
||||
.IP
|
||||
RTF:
|
||||
analyze \fB\-w\fR rtf styleSheetFile
|
||||
.IP
|
||||
HTML:
|
||||
analyze \fB\-w\fR html headerFile footerFile styleSheetFile [configFile]
|
||||
.IP
|
||||
LaTeX: analyze \fB\-w\fR latex headerFile footerFile styleSheetFile [configFile]
|
||||
.TP
|
||||
6) Use analyze to generate an rtf extensions file
|
||||
.IP
|
||||
RTF:
|
||||
analyze \fB\-e\fR rtf extensionsFile
|
||||
.IP
|
||||
.RS 0
|
||||
If - is used for extensionsFile analyze will write to standard output.
|
||||
.RE
|
||||
.TP
|
||||
7) Use analyze to compare the used configuration file with the template configuration file
|
||||
.IP
|
||||
analyze \fB\-x\fR [configFile]
|
||||
.TP
|
||||
Use analyze to compare the used configuration file with the template configuration file
|
||||
.RS 0
|
||||
without replacing the environment variables or CMake type replacement variables
|
||||
.RE
|
||||
.IP
|
||||
analyze \fB\-x_noenv\fR [configFile]
|
||||
.TP
|
||||
8) Use analyze to show a list of built-in emojis.
|
||||
.IP
|
||||
analyze \fB\-f\fR emoji outputFileName
|
||||
.IP
|
||||
.RS 0
|
||||
If - is used for outputFileName analyze will write to standard output.
|
||||
.RE
|
||||
.PP
|
||||
.RS 0
|
||||
*) If \fB\-s\fR is specified the comments of the configuration items in the config file will be omitted.
|
||||
If configName is omitted 'analzfile' will be used as a default.
|
||||
If - is used for configFile analyze will write / read the configuration to /from standard output / input.
|
||||
.RE
|
||||
.PP
|
||||
If \fB\-q\fR is used for a analyze documentation run, analyze will see this as if QUIET=YES has been set.
|
||||
.PP
|
||||
\fB\-v\fR print version string, \fB\-V\fR print extended version information
|
||||
.PP
|
||||
\fB\-h\fR,\fB\-?\fR prints usage help information
|
||||
.PP
|
||||
analyze \fB\-d\fR prints additional usage flags for debugging purposes
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
analyze version @VERSION@, Copyright Dimitri van Heesch 1997-@YEAR@
|
||||
.SH SEE ALSO
|
||||
analzwizard(1).
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |