mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-28 12:09:46 +00:00
Merge branch 'master' of https://gitlab.com/madsbuvi/openmw into openxr_vr
This commit is contained in:
commit
4f8f0cc8ac
635 changed files with 11239 additions and 6910 deletions
105
.gitlab-ci.yml
105
.gitlab-ci.yml
|
@ -1,50 +1,89 @@
|
|||
stages:
|
||||
- build
|
||||
|
||||
Debian:
|
||||
|
||||
.Debian:
|
||||
tags:
|
||||
- docker
|
||||
- linux
|
||||
image: debian:bullseye
|
||||
cache:
|
||||
key: cache.002
|
||||
paths:
|
||||
- apt-cache/
|
||||
- ccache/
|
||||
before_script:
|
||||
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
|
||||
- apt-get update -yq
|
||||
- apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y cmake build-essential libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-iostreams-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libsdl2-dev libqt5opengl5-dev libopenal-dev libopenscenegraph-dev libunshield-dev libtinyxml-dev libmygui-dev libbullet-dev ccache
|
||||
- apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y cmake build-essential libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-iostreams-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libsdl2-dev libqt5opengl5-dev libopenal-dev libopenscenegraph-dev libunshield-dev libtinyxml-dev libmygui-dev libbullet-dev liblz4-dev ccache git clang
|
||||
stage: build
|
||||
script:
|
||||
- export CCACHE_BASEDIR="`pwd`"
|
||||
- export CCACHE_DIR="`pwd`/ccache" && mkdir -pv "$CCACHE_DIR"
|
||||
- ccache -z -M 250M
|
||||
- cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi
|
||||
- mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
- make -j$cores_to_use
|
||||
- DESTDIR=artifacts make install
|
||||
- ccache -z -M "${CCACHE_SIZE}"
|
||||
- CI/before_script.linux.sh
|
||||
- cd build
|
||||
- cmake --build . -- -j $(nproc)
|
||||
- cmake --install .
|
||||
- if [[ "${BUILD_TESTS_ONLY}" ]]; then ./openmw_test_suite; fi
|
||||
- ccache -s
|
||||
artifacts:
|
||||
paths:
|
||||
- build/artifacts/
|
||||
- build/install/
|
||||
|
||||
Debian_GCC:
|
||||
extends: .Debian
|
||||
cache:
|
||||
key: Debian_GCC.v2
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
CCACHE_SIZE: 3G
|
||||
|
||||
Debian_GCC_tests:
|
||||
extends: .Debian
|
||||
cache:
|
||||
key: Debian_GCC_tests.v2
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
CCACHE_SIZE: 1G
|
||||
BUILD_TESTS_ONLY: 1
|
||||
|
||||
Debian_Clang:
|
||||
extends: .Debian
|
||||
cache:
|
||||
key: Debian_Clang.v2
|
||||
variables:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
CCACHE_SIZE: 2G
|
||||
|
||||
Debian_Clang_tests:
|
||||
extends: .Debian
|
||||
cache:
|
||||
key: Debian_Clang_tests.v2
|
||||
variables:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
CCACHE_SIZE: 1G
|
||||
BUILD_TESTS_ONLY: 1
|
||||
|
||||
MacOS:
|
||||
tags:
|
||||
- macos
|
||||
- xcode
|
||||
except:
|
||||
- branches # because our CI VMs are not public, MRs can't use them and timeout
|
||||
stage: build
|
||||
allow_failure: true
|
||||
only:
|
||||
variables:
|
||||
- $CI_PROJECT_ID == "7107382"
|
||||
script:
|
||||
- rm -fr build/* # remove anything in the build directory
|
||||
- rm -fr build/* # remove anything in the build directory
|
||||
- CI/before_install.osx.sh
|
||||
- CI/before_script.osx.sh
|
||||
- cd build; make -j2 package
|
||||
- for dmg in *.dmg; do mv "$dmg" "${dmg%.dmg}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.dmg"; done
|
||||
artifacts:
|
||||
paths:
|
||||
- build/OpenMW-*.dmg
|
||||
- "build/**/*.log"
|
||||
|
||||
variables: &engine-targets
|
||||
targets: "openmw_vr,openmw-essimporter,openmw-iniimporter,openmw-launcher,openmw-wizard"
|
||||
|
@ -57,6 +96,7 @@ variables: &cs-targets
|
|||
- windows
|
||||
before_script:
|
||||
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolately/" --priority=1
|
||||
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
||||
- choco install 7zip -y
|
||||
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||
|
@ -146,6 +186,7 @@ Windows_Ninja_CS_RelWithDebInfo:
|
|||
- windows
|
||||
before_script:
|
||||
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolately/" --priority=1
|
||||
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
||||
- choco install 7zip -y
|
||||
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||
|
@ -226,4 +267,36 @@ Windows_MSBuild_CS_RelWithDebInfo:
|
|||
- .Windows_MSBuild_Base
|
||||
variables:
|
||||
<<: *cs-targets
|
||||
config: "RelWithDebInfo"
|
||||
config: "RelWithDebInfo"
|
||||
|
||||
Debian_AndroidNDK_arm64-v8a:
|
||||
tags:
|
||||
- linux
|
||||
image: debian:bullseye
|
||||
variables:
|
||||
CCACHE_SIZE: 3G
|
||||
cache:
|
||||
key: Debian_AndroidNDK_arm64-v8a.v2
|
||||
paths:
|
||||
- apt-cache/
|
||||
- ccache/
|
||||
before_script:
|
||||
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
|
||||
- echo "deb http://deb.debian.org/debian unstable main contrib" > /etc/apt/sources.list
|
||||
- echo "google-android-ndk-installer google-android-installers/mirror select https://dl.google.com" | debconf-set-selections
|
||||
- apt-get update -yq
|
||||
- apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y cmake ccache curl unzip git build-essential google-android-ndk-installer
|
||||
stage: build
|
||||
script:
|
||||
- export CCACHE_BASEDIR="`pwd`"
|
||||
- export CCACHE_DIR="`pwd`/ccache" && mkdir -pv "$CCACHE_DIR"
|
||||
- ccache -z -M "${CCACHE_SIZE}"
|
||||
- CI/before_install.android.sh
|
||||
- CI/before_script.android.sh
|
||||
- cd build
|
||||
- cmake --build . -- -j $(nproc)
|
||||
- cmake --install .
|
||||
- ccache -s
|
||||
artifacts:
|
||||
paths:
|
||||
- build/install/
|
18
.travis.yml
18
.travis.yml
|
@ -23,7 +23,7 @@ addons:
|
|||
# FFmpeg
|
||||
libavcodec-dev, libavformat-dev, libavutil-dev, libswresample-dev, libswscale-dev,
|
||||
# Audio, Video and Misc. deps
|
||||
libsdl2-dev, libqt5opengl5-dev, libopenal-dev, libunshield-dev, libtinyxml-dev,
|
||||
libsdl2-dev, libqt5opengl5-dev, libopenal-dev, libunshield-dev, libtinyxml-dev, liblz4-dev
|
||||
# The other ones from OpenMW ppa
|
||||
libbullet-dev, libopenscenegraph-dev, libmygui-dev
|
||||
]
|
||||
|
@ -37,14 +37,20 @@ addons:
|
|||
build_command: "make VERBOSE=1 -j3"
|
||||
matrix:
|
||||
include:
|
||||
- name: OpenMW (all) on MacOS 10.15 with Xcode 12
|
||||
- name: OpenMW (all) on MacOS 10.15 with Xcode 11.6
|
||||
os: osx
|
||||
osx_image: xcode12
|
||||
osx_image: xcode11.6
|
||||
if: branch != coverity_scan
|
||||
- name: OpenMW (all) on Ubuntu Focal with GCC
|
||||
os: linux
|
||||
dist: focal
|
||||
if: branch != coverity_scan
|
||||
- name: OpenMW (tests only) on Ubuntu Focal with GCC
|
||||
os: linux
|
||||
dist: focal
|
||||
if: branch != coverity_scan
|
||||
env:
|
||||
- BUILD_TESTS_ONLY: 1
|
||||
- name: OpenMW (openmw) on Ubuntu Focal with Clang's Static Analysis
|
||||
os: linux
|
||||
dist: focal
|
||||
|
@ -71,9 +77,9 @@ before_script:
|
|||
script:
|
||||
- cd ./build
|
||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ${ANALYZE} make -j3; fi
|
||||
# - if [ "${COVERITY_SCAN_BRANCH}" != 1 ] && [ "${TRAVIS_OS_NAME}" = "osx" ]; then make package; fi
|
||||
# - if [ "${COVERITY_SCAN_BRANCH}" != 1 ] && [ "${TRAVIS_OS_NAME}" = "osx" ]; then ../CI/check_package.osx.sh; fi
|
||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ] && [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./openmw_test_suite; fi
|
||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ] && [ "${TRAVIS_OS_NAME}" = "osx" ]; then make package; fi
|
||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ] && [ "${TRAVIS_OS_NAME}" = "osx" ]; then ../CI/check_package.osx.sh; fi
|
||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ] && [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${BUILD_TESTS_ONLY}" ]; then ./openmw_test_suite; fi
|
||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ] && [ "${TRAVIS_OS_NAME}" = "linux" ]; then cd .. && ./CI/check_tabs.sh; fi
|
||||
- cd "${TRAVIS_BUILD_DIR}"
|
||||
- ccache -s
|
||||
|
|
10
AUTHORS.md
10
AUTHORS.md
|
@ -10,7 +10,10 @@ If you feel your name is missing from this list, please notify a developer.
|
|||
Programmers
|
||||
-----------
|
||||
|
||||
Marc Zinnschlag (Zini) - Lead Programmer/Project Manager
|
||||
Bret Curtis (psi29a) - Project leader 2019-present
|
||||
Marc Zinnschlag (Zini) - Project leader 2010-2018
|
||||
Nicolay Korslund - Project leader 2008-2010
|
||||
scrawl - Top contributor
|
||||
|
||||
Adam Hogan (aurix)
|
||||
Aesylwinn
|
||||
|
@ -39,7 +42,6 @@ Programmers
|
|||
Austin Salgat (Salgat)
|
||||
Ben Shealy (bentsherman)
|
||||
Berulacks
|
||||
Bret Curtis (psi29a)
|
||||
Britt Mathis (galdor557)
|
||||
Capostrophic
|
||||
Carl Maxwell
|
||||
|
@ -146,7 +148,6 @@ Programmers
|
|||
Nathan Jeffords (blunted2night)
|
||||
NeveHanter
|
||||
Nialsy
|
||||
Nicolay Korslund
|
||||
Nikolay Kasyanov (corristo)
|
||||
nobrakal
|
||||
Nolan Poe (nopoe)
|
||||
|
@ -175,7 +176,6 @@ Programmers
|
|||
Roman Siromakha (elsid)
|
||||
Sandy Carter (bwrsandman)
|
||||
Scott Howard (maqifrnswa)
|
||||
scrawl
|
||||
Sebastian Wick (swick)
|
||||
Sergey Fukanchik
|
||||
Sergey Shambir (sergey-shambir)
|
||||
|
@ -302,4 +302,4 @@ Thanks to Kevin Ryan,
|
|||
for creating the icon used for the Data Files tab of the OpenMW Launcher.
|
||||
|
||||
Thanks to DejaVu team,
|
||||
for their DejaVuLGCSansMono fontface, see DejaVu Font License.txt for their license terms.
|
||||
for their DejaVuLGCSansMono fontface, see DejaVuFontLicense.txt for their license terms.
|
||||
|
|
29
CHANGELOG.md
29
CHANGELOG.md
|
@ -3,13 +3,21 @@
|
|||
|
||||
Bug #1662: Qt4 and Windows binaries crash if there's a non-ASCII character in a file path/config path
|
||||
Bug #1952: Incorrect particle lighting
|
||||
Bug #2069: Fireflies in Fireflies invade Morrowind look wrong
|
||||
Bug #2311: Targeted scripts are not properly supported on non-unique RefIDs
|
||||
Bug #2473: Unable to overstock merchants
|
||||
Bug #2798: Mutable ESM records
|
||||
Bug #3676: NiParticleColorModifier isn't applied properly
|
||||
Bug #3714: Savegame fails to load due to conflict between SpellState and MagicEffects
|
||||
Bug #3862: Random container contents behave differently than vanilla
|
||||
Bug #3929: Leveled list merchant containers respawn on barter
|
||||
Bug #4021: Attributes and skills are not stored as floats
|
||||
Bug #4055: Local scripts don't inherit variables from their base record
|
||||
Bug #4623: Corprus implementation is incorrect
|
||||
Bug #4631: Setting MSAA level too high doesn't fall back to highest supported level
|
||||
Bug #4764: Data race in osg ParticleSystem
|
||||
Bug #4774: Guards are ignorant of an invisible player that tries to attack them
|
||||
Bug #5101: Hostile followers travel with the player
|
||||
Bug #5108: Savegame bloating due to inefficient fog textures format
|
||||
Bug #5165: Active spells should use real time intead of timestamps
|
||||
Bug #5358: ForceGreeting always resets the dialogue window completely
|
||||
|
@ -41,16 +49,37 @@
|
|||
Bug #5502: Dead zone for analogue stick movement is too small
|
||||
Bug #5507: Sound volume is not clamped on ingame settings update
|
||||
Bug #5531: Actors flee using current rotation by axis x
|
||||
Bug #5539: Window resize breaks when going from a lower resolution to full screen resolution
|
||||
Bug #5548: Certain exhausted topics can be highlighted again even though there's no new dialogue
|
||||
Bug #5557: Diagonal movement is noticeably slower with analogue stick
|
||||
Bug #5588: Randomly clicking on the journal's right-side page when it's empty shows random topics
|
||||
Bug #5603: Setting constant effect cast style doesn't correct effects view
|
||||
Bug #5611: Usable items with "0 Uses" should be used only once
|
||||
Bug #5622: Can't properly interact with the console when in pause menu
|
||||
Bug #5639: Tooltips cover Messageboxes
|
||||
Bug #5644: Summon effects running on the player during game initialization cause crashes
|
||||
Feature #390: 3rd person look "over the shoulder"
|
||||
Feature #2386: Distant Statics in the form of Object Paging
|
||||
Feature #2404: Levelled List can not be placed into a container
|
||||
Feature #4894: Consider actors as obstacles for pathfinding
|
||||
Feature #5043: Head Bobbing
|
||||
Feature #5297: Add a search function to the "Datafiles" tab of the OpenMW launcher
|
||||
Feature #5362: Show the soul gems' trapped soul in count dialog
|
||||
Feature #5445: Handle NiLines
|
||||
Feature #5457: Realistic diagonal movement
|
||||
Feature #5486: Fixes trainers to choose their training skills based on their base skill points
|
||||
Feature #5519: Code Patch tab in launcher
|
||||
Feature #5524: Resume failed script execution after reload
|
||||
Feature #5525: Search fields tweaks (utf-8)
|
||||
Feature #5545: Option to allow stealing from an unconscious NPC during combat
|
||||
Feature #5563: Run physics update in background thread
|
||||
Feature #5579: MCP SetAngle enhancement
|
||||
Feature #5580: Service refusal filtering
|
||||
Feature #5610: Actors movement should be smoother
|
||||
Feature #5642: Ability to attach arrows to actor skeleton instead of bow mesh
|
||||
Feature #5649: Skyrim SE compressed BSA format support
|
||||
Task #5480: Drop Qt4 support
|
||||
Task #5520: Improve cell name autocompleter implementation
|
||||
|
||||
0.46.0
|
||||
------
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
oldSettings=$-
|
||||
set -eu
|
||||
|
||||
function restoreOldSettings {
|
||||
if [[ $oldSettings != *e* ]]; then
|
||||
set +e
|
||||
fi
|
||||
if [[ $oldSettings != *u* ]]; then
|
||||
set +u
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
||||
echo "Error: Script not sourced."
|
||||
|
@ -8,6 +18,7 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
|||
echo "source ./activate_msvc.sh"
|
||||
echo "or"
|
||||
echo ". ./activate_msvc.sh"
|
||||
restoreOldSettings
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -78,7 +89,10 @@ command -v mt >/dev/null 2>&1 || { echo "Error: mt (MS Windows Manifest Tool) mi
|
|||
|
||||
if [ $MISSINGTOOLS -ne 0 ]; then
|
||||
echo "Some build tools were unavailable after activating MSVC in the shell. It's likely that your Visual Studio $MSVC_DISPLAY_YEAR installation needs repairing."
|
||||
restoreOldSettings
|
||||
return 1
|
||||
fi
|
||||
|
||||
IFS="$originalIFS"
|
||||
IFS="$originalIFS"
|
||||
|
||||
restoreOldSettings
|
4
CI/before_install.android.sh
Executable file
4
CI/before_install.android.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh -ex
|
||||
|
||||
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/android/openmw-android-deps-20201018.zip -o ~/openmw-android-deps.zip
|
||||
unzip -o ~/openmw-android-deps -d /usr/lib/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr > /dev/null
|
|
@ -1,6 +1,12 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
brew install ccache
|
||||
# Some of these tools can come from places other than brew, so check before installing
|
||||
command -v ccache >/dev/null 2>&1 || brew install ccache
|
||||
command -v cmake >/dev/null 2>&1 || brew install cmake
|
||||
command -v qmake >/dev/null 2>&1 || brew install qt
|
||||
|
||||
brew link --overwrite lz4 # overwrite system lz4; use brew
|
||||
brew reinstall lz4
|
||||
|
||||
curl -fSL -R -J https://downloads.openmw.org/osx/dependencies/openmw-deps-ef2462c.zip -o ~/openmw-deps.zip
|
||||
unzip -o ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null
|
||||
|
|
25
CI/before_script.android.sh
Executable file
25
CI/before_script.android.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh -ex
|
||||
|
||||
# hack to work around: FFmpeg version is too old, 3.2 is required
|
||||
sed -i s/"NOT FFVER_OK"/"FALSE"/ CMakeLists.txt
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/usr/lib/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake \
|
||||
-DANDROID_ABI=arm64-v8a \
|
||||
-DANDROID_PLATFORM=android-21 \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_INSTALL_PREFIX=install \
|
||||
-DBUILD_BSATOOL=0 \
|
||||
-DBUILD_NIFTEST=0 \
|
||||
-DBUILD_ESMTOOL=0 \
|
||||
-DBUILD_LAUNCHER=0 \
|
||||
-DBUILD_MWINIIMPORTER=0 \
|
||||
-DBUILD_ESSIMPORTER=0 \
|
||||
-DBUILD_OPENCS=0 \
|
||||
-DBUILD_WIZARD=0 \
|
||||
-DMyGUI_LIBRARY="/usr/lib/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/libMyGUIEngineStatic.a" \
|
||||
..
|
|
@ -2,22 +2,43 @@
|
|||
|
||||
free -m
|
||||
|
||||
env GENERATOR='Unix Makefiles' CONFIGURATION=Release CI/build_googletest.sh
|
||||
GOOGLETEST_DIR="$(pwd)/googletest/build"
|
||||
if [[ "${BUILD_TESTS_ONLY}" ]]; then
|
||||
export GOOGLETEST_DIR="$(pwd)/googletest/build/install"
|
||||
env GENERATOR='Unix Makefiles' CONFIGURATION=Release CI/build_googletest.sh
|
||||
fi
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
${ANALYZE} cmake \
|
||||
-DCMAKE_C_COMPILER="${CC}" \
|
||||
-DCMAKE_CXX_COMPILER="${CXX}" \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DBUILD_UNITTESTS=TRUE \
|
||||
-DUSE_SYSTEM_TINYXML=TRUE \
|
||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||
-DBINDIR="/usr/games" \
|
||||
-DCMAKE_BUILD_TYPE="DEBUG" \
|
||||
-DGTEST_ROOT="${GOOGLETEST_DIR}" \
|
||||
-DGMOCK_ROOT="${GOOGLETEST_DIR}" \
|
||||
..
|
||||
if [[ "${BUILD_TESTS_ONLY}" ]]; then
|
||||
${ANALYZE} cmake \
|
||||
-D CMAKE_C_COMPILER="${CC}" \
|
||||
-D CMAKE_CXX_COMPILER="${CXX}" \
|
||||
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-D CMAKE_INSTALL_PREFIX=install \
|
||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-D USE_SYSTEM_TINYXML=TRUE \
|
||||
-D BUILD_OPENMW=OFF \
|
||||
-D BUILD_BSATOOL=OFF \
|
||||
-D BUILD_ESMTOOL=OFF \
|
||||
-D BUILD_LAUNCHER=OFF \
|
||||
-D BUILD_MWINIIMPORTER=OFF \
|
||||
-D BUILD_ESSIMPORTER=OFF \
|
||||
-D BUILD_OPENCS=OFF \
|
||||
-D BUILD_WIZARD=OFF \
|
||||
-D BUILD_UNITTESTS=ON \
|
||||
-D GTEST_ROOT="${GOOGLETEST_DIR}" \
|
||||
-D GMOCK_ROOT="${GOOGLETEST_DIR}" \
|
||||
..
|
||||
else
|
||||
${ANALYZE} cmake \
|
||||
-D CMAKE_C_COMPILER="${CC}" \
|
||||
-D CMAKE_CXX_COMPILER="${CXX}" \
|
||||
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-D USE_SYSTEM_TINYXML=TRUE \
|
||||
-D CMAKE_INSTALL_PREFIX=install \
|
||||
-D CMAKE_BUILD_TYPE=Debug \
|
||||
..
|
||||
fi
|
||||
|
|
|
@ -69,7 +69,7 @@ NMAKE=""
|
|||
NINJA=""
|
||||
PDBS=""
|
||||
PLATFORM=""
|
||||
CONFIGURATION=""
|
||||
CONFIGURATIONS=()
|
||||
TEST_FRAMEWORK=""
|
||||
GOOGLE_INSTALL_ROOT=""
|
||||
INSTALL_PREFIX="."
|
||||
|
@ -133,7 +133,7 @@ while [ $# -gt 0 ]; do
|
|||
PDBS=true ;;
|
||||
|
||||
c )
|
||||
CONFIGURATION=$1
|
||||
CONFIGURATIONS+=( $1 )
|
||||
shift ;;
|
||||
|
||||
t )
|
||||
|
@ -147,8 +147,10 @@ while [ $# -gt 0 ]; do
|
|||
cat <<EOF
|
||||
Usage: $0 [-cdehkpuvVi]
|
||||
Options:
|
||||
-c <Release/Debug>
|
||||
-c <Release/Debug/RelWithDebInfo>
|
||||
Set the configuration, can also be set with environment variable CONFIGURATION.
|
||||
For mutli-config generators, this is ignored, and all configurations are set up.
|
||||
For single-config generators, several configurations can be set up at once by specifying -c multiple times.
|
||||
-d
|
||||
Skip checking the downloads.
|
||||
-D
|
||||
|
@ -168,7 +170,7 @@ Options:
|
|||
-v <2017/2019>
|
||||
Choose the Visual Studio version to use.
|
||||
-n
|
||||
Produce NMake makefiles instead of a Visual Studio solution. Cannout be used with -N.
|
||||
Produce NMake makefiles instead of a Visual Studio solution. Cannot be used with -N.
|
||||
-N
|
||||
Produce Ninja (multi-config if CMake is new enough to support it) files instead of a Visual Studio solution. Cannot be used with -n..
|
||||
-P
|
||||
|
@ -191,7 +193,7 @@ done
|
|||
|
||||
if [ -n "$NMAKE" ] || [ -n "$NINJA" ]; then
|
||||
if [ -n "$NMAKE" ] && [ -n "$NINJA" ]; then
|
||||
echo "Cannout run in NMake and Ninja mode at the same time."
|
||||
echo "Cannot run in NMake and Ninja mode at the same time."
|
||||
wrappedExit 1
|
||||
fi
|
||||
ACTIVATE_MSVC=true
|
||||
|
@ -262,10 +264,10 @@ download() {
|
|||
|
||||
if [ -z $VERBOSE ]; then
|
||||
RET=0
|
||||
curl --silent --retry 10 -kLy 5 -o $FILE $URL || RET=$?
|
||||
curl --silent --retry 10 -Ly 5 -o $FILE $URL || RET=$?
|
||||
else
|
||||
RET=0
|
||||
curl --retry 10 -kLy 5 -o $FILE $URL || RET=$?
|
||||
curl --retry 10 -Ly 5 -o $FILE $URL || RET=$?
|
||||
fi
|
||||
|
||||
if [ $RET -ne 0 ]; then
|
||||
|
@ -297,29 +299,40 @@ add_cmake_opts() {
|
|||
CMAKE_OPTS="$CMAKE_OPTS $@"
|
||||
}
|
||||
|
||||
RUNTIME_DLLS=""
|
||||
declare -A RUNTIME_DLLS
|
||||
RUNTIME_DLLS["Release"]=""
|
||||
RUNTIME_DLLS["Debug"]=""
|
||||
RUNTIME_DLLS["RelWithDebInfo"]=""
|
||||
add_runtime_dlls() {
|
||||
RUNTIME_DLLS="$RUNTIME_DLLS $@"
|
||||
local CONFIG=$1
|
||||
shift
|
||||
RUNTIME_DLLS[$CONFIG]="${RUNTIME_DLLS[$CONFIG]} $@"
|
||||
}
|
||||
|
||||
OSG_PLUGINS=""
|
||||
declare -A OSG_PLUGINS
|
||||
OSG_PLUGINS["Release"]=""
|
||||
OSG_PLUGINS["Debug"]=""
|
||||
OSG_PLUGINS["RelWithDebInfo"]=""
|
||||
add_osg_dlls() {
|
||||
OSG_PLUGINS="$OSG_PLUGINS $@"
|
||||
local CONFIG=$1
|
||||
shift
|
||||
OSG_PLUGINS[$CONFIG]="${OSG_PLUGINS[$CONFIG]} $@"
|
||||
}
|
||||
|
||||
QT_PLATFORMS=""
|
||||
declare -A QT_PLATFORMS
|
||||
QT_PLATFORMS["Release"]=""
|
||||
QT_PLATFORMS["Debug"]=""
|
||||
QT_PLATFORMS["RelWithDebInfo"]=""
|
||||
add_qt_platform_dlls() {
|
||||
QT_PLATFORMS="$QT_PLATFORMS $@"
|
||||
local CONFIG=$1
|
||||
shift
|
||||
QT_PLATFORMS[$CONFIG]="${QT_PLATFORMS[$CONFIG]} $@"
|
||||
}
|
||||
|
||||
if [ -z $PLATFORM ]; then
|
||||
PLATFORM="$(uname -m)"
|
||||
fi
|
||||
|
||||
if [ -z $CONFIGURATION ]; then
|
||||
CONFIGURATION="Debug"
|
||||
fi
|
||||
|
||||
if [ -z $VS_VERSION ]; then
|
||||
VS_VERSION="2017"
|
||||
fi
|
||||
|
@ -381,23 +394,6 @@ case $PLATFORM in
|
|||
;;
|
||||
esac
|
||||
|
||||
case $CONFIGURATION in
|
||||
debug|Debug|DEBUG )
|
||||
CONFIGURATION=Debug
|
||||
BUILD_CONFIG=Debug
|
||||
;;
|
||||
|
||||
release|Release|RELEASE )
|
||||
CONFIGURATION=Release
|
||||
BUILD_CONFIG=Release
|
||||
;;
|
||||
|
||||
relwithdebinfo|RelWithDebInfo|RELWITHDEBINFO )
|
||||
CONFIGURATION=Release
|
||||
BUILD_CONFIG=RelWithDebInfo
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ $BITS -eq 64 ] && [ $MSVC_REAL_VER -lt 16 ]; then
|
||||
GENERATOR="${GENERATOR} Win64"
|
||||
fi
|
||||
|
@ -415,6 +411,79 @@ if [ -n "$NINJA" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$SINGLE_CONFIG" ]; then
|
||||
if [ ${#CONFIGURATIONS[@]} -eq 0 ]; then
|
||||
if [ -n "${CONFIGURATION:-}" ]; then
|
||||
CONFIGURATIONS=("$CONFIGURATION")
|
||||
else
|
||||
CONFIGURATIONS=("Debug")
|
||||
fi
|
||||
elif [ ${#CONFIGURATIONS[@]} -ne 1 ]; then
|
||||
# It's simplest just to recursively call the script a few times.
|
||||
RECURSIVE_OPTIONS=()
|
||||
if [ -n "$VERBOSE" ]; then
|
||||
RECURSIVE_OPTIONS+=("-V")
|
||||
fi
|
||||
if [ -n "$SKIP_DOWNLOAD" ]; then
|
||||
RECURSIVE_OPTIONS+=("-d")
|
||||
fi
|
||||
if [ -n "$BULLET_DOUBLE" ]; then
|
||||
RECURSIVE_OPTIONS+=("-D")
|
||||
fi
|
||||
if [ -n "$SKIP_EXTRACT" ]; then
|
||||
RECURSIVE_OPTIONS+=("-e")
|
||||
fi
|
||||
if [ -n "$KEEP" ]; then
|
||||
RECURSIVE_OPTIONS+=("-k")
|
||||
fi
|
||||
if [ -n "$UNITY_BUILD" ]; then
|
||||
RECURSIVE_OPTIONS+=("-u")
|
||||
fi
|
||||
if [ -n "$NMAKE" ]; then
|
||||
RECURSIVE_OPTIONS+=("-n")
|
||||
fi
|
||||
if [ -n "$NINJA" ]; then
|
||||
RECURSIVE_OPTIONS+=("-N")
|
||||
fi
|
||||
if [ -n "$PDBS" ]; then
|
||||
RECURSIVE_OPTIONS+=("-P")
|
||||
fi
|
||||
if [ -n "$TEST_FRAMEWORK" ]; then
|
||||
RECURSIVE_OPTIONS+=("-t")
|
||||
fi
|
||||
RECURSIVE_OPTIONS+=("-v $VS_VERSION")
|
||||
RECURSIVE_OPTIONS+=("-p $PLATFORM")
|
||||
RECURSIVE_OPTIONS+=("-i '$INSTALL_PREFIX'")
|
||||
|
||||
for config in ${CONFIGURATIONS[@]}; do
|
||||
$0 ${RECURSIVE_OPTIONS[@]} -c $config
|
||||
done
|
||||
|
||||
wrappedExit 1
|
||||
fi
|
||||
else
|
||||
if [ ${#CONFIGURATIONS[@]} -ne 0 ]; then
|
||||
echo "Ignoring configurations argument - generator is multi-config"
|
||||
fi
|
||||
CONFIGURATIONS=("Release" "Debug" "RelWithDebInfo")
|
||||
fi
|
||||
|
||||
for i in ${!CONFIGURATIONS[@]}; do
|
||||
case ${CONFIGURATIONS[$i]} in
|
||||
debug|Debug|DEBUG )
|
||||
CONFIGURATIONS[$i]=Debug
|
||||
;;
|
||||
|
||||
release|Release|RELEASE )
|
||||
CONFIGURATIONS[$i]=Release
|
||||
;;
|
||||
|
||||
relwithdebinfo|RelWithDebInfo|RELWITHDEBINFO )
|
||||
CONFIGURATIONS[$i]=RelWithDebInfo
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $MSVC_REAL_VER -ge 16 ] && [ -z "$NMAKE" ] && [ -z "$NINJA" ]; then
|
||||
if [ $BITS -eq 64 ]; then
|
||||
add_cmake_opts "-G\"$GENERATOR\" -A x64"
|
||||
|
@ -426,7 +495,7 @@ else
|
|||
fi
|
||||
|
||||
if [ -n "$SINGLE_CONFIG" ]; then
|
||||
add_cmake_opts "-DCMAKE_BUILD_TYPE=${BUILD_CONFIG}"
|
||||
add_cmake_opts "-DCMAKE_BUILD_TYPE=${CONFIGURATIONS[0]}"
|
||||
fi
|
||||
|
||||
if ! [ -z $UNITY_BUILD ]; then
|
||||
|
@ -458,54 +527,59 @@ if [ -z $SKIP_DOWNLOAD ]; then
|
|||
# Boost
|
||||
if [ -z $APPVEYOR ]; then
|
||||
download "Boost ${BOOST_VER}" \
|
||||
"https://sourceforge.net/projects/boost/files/boost-binaries/${BOOST_VER}/boost_${BOOST_VER_URL}-msvc-${MSVC_VER}-${BITS}.exe" \
|
||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/boost_${BOOST_VER_URL}-msvc-${MSVC_VER}-${BITS}.exe" \
|
||||
"boost-${BOOST_VER}-msvc${MSVC_VER}-win${BITS}.exe"
|
||||
fi
|
||||
|
||||
# Bullet
|
||||
download "Bullet 2.89 (${BULLET_DBL_DISPLAY})" \
|
||||
"https://rgw.ctrl-c.liu.se/openmw/Deps/Bullet-2.89-msvc${MSVC_YEAR}-win${BITS}${BULLET_DBL}.7z" \
|
||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/Bullet-2.89-msvc${MSVC_YEAR}-win${BITS}${BULLET_DBL}.7z" \
|
||||
"Bullet-2.89-msvc${MSVC_YEAR}-win${BITS}${BULLET_DBL}.7z"
|
||||
|
||||
# FFmpeg
|
||||
download "FFmpeg 4.2.2" \
|
||||
"https://ffmpeg.zeranoe.com/builds/win${BITS}/shared/ffmpeg-4.2.2-win${BITS}-shared.zip" \
|
||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/ffmpeg-4.2.2-win${BITS}.zip" \
|
||||
"ffmpeg-4.2.2-win${BITS}.zip" \
|
||||
"https://ffmpeg.zeranoe.com/builds/win${BITS}/dev/ffmpeg-4.2.2-win${BITS}-dev.zip" \
|
||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/ffmpeg-4.2.2-dev-win${BITS}.zip" \
|
||||
"ffmpeg-4.2.2-dev-win${BITS}.zip"
|
||||
|
||||
# MyGUI
|
||||
download "MyGUI 3.4.0" \
|
||||
"https://rgw.ctrl-c.liu.se/openmw/Deps/MyGUI-3.4.0-msvc${MSVC_REAL_YEAR}-win${BITS}.7z" \
|
||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/MyGUI-3.4.0-msvc${MSVC_REAL_YEAR}-win${BITS}.7z" \
|
||||
"MyGUI-3.4.0-msvc${MSVC_REAL_YEAR}-win${BITS}.7z"
|
||||
|
||||
if [ -n "$PDBS" ]; then
|
||||
download "MyGUI symbols" \
|
||||
"https://rgw.ctrl-c.liu.se/openmw/Deps/MyGUI-3.4.0-msvc${MSVC_REAL_YEAR}-win${BITS}-sym.7z" \
|
||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/MyGUI-3.4.0-msvc${MSVC_REAL_YEAR}-win${BITS}-sym.7z" \
|
||||
"MyGUI-3.4.0-msvc${MSVC_REAL_YEAR}-win${BITS}-sym.7z"
|
||||
fi
|
||||
|
||||
# OpenAL
|
||||
download "OpenAL-Soft 1.20.1" \
|
||||
"http://openal-soft.org/openal-binaries/openal-soft-1.20.1-bin.zip" \
|
||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/OpenAL-Soft-1.20.1.zip" \
|
||||
"OpenAL-Soft-1.20.1.zip"
|
||||
|
||||
# OSG
|
||||
download "OpenSceneGraph 3.6.5" \
|
||||
"https://rgw.ctrl-c.liu.se/openmw/Deps/OSG-3.6.5-msvc${MSVC_REAL_YEAR}-win${BITS}.7z" \
|
||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/OSG-3.6.5-msvc${MSVC_REAL_YEAR}-win${BITS}.7z" \
|
||||
"OSG-3.6.5-msvc${MSVC_REAL_YEAR}-win${BITS}.7z"
|
||||
|
||||
if [ -n "$PDBS" ]; then
|
||||
download "OpenSceneGraph symbols" \
|
||||
"https://rgw.ctrl-c.liu.se/openmw/Deps/OSG-3.6.5-msvc${MSVC_REAL_YEAR}-win${BITS}-sym.7z" \
|
||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/OSG-3.6.5-msvc${MSVC_REAL_YEAR}-win${BITS}-sym.7z" \
|
||||
"OSG-3.6.5-msvc${MSVC_REAL_YEAR}-win${BITS}-sym.7z"
|
||||
fi
|
||||
|
||||
# SDL2
|
||||
download "SDL 2.0.12" \
|
||||
"https://www.libsdl.org/release/SDL2-devel-2.0.12-VC.zip" \
|
||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/SDL2-2.0.12.zip" \
|
||||
"SDL2-2.0.12.zip"
|
||||
|
||||
# LZ4
|
||||
download "LZ4 1.9.2" \
|
||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/lz4_win${BITS}_v1_9_2.7z" \
|
||||
"lz4_win${BITS}_v1_9_2.7z"
|
||||
|
||||
# Google test and mock
|
||||
if [ ! -z $TEST_FRAMEWORK ]; then
|
||||
echo "Google test 1.10.0..."
|
||||
|
@ -529,7 +603,7 @@ elif [ -n "$NINJA" ]; then
|
|||
fi
|
||||
|
||||
if [ -n "$SINGLE_CONFIG" ]; then
|
||||
BUILD_DIR="${BUILD_DIR}_${BUILD_CONFIG}"
|
||||
BUILD_DIR="${BUILD_DIR}_${CONFIGURATIONS[0]}"
|
||||
fi
|
||||
|
||||
if [ -z $KEEP ]; then
|
||||
|
@ -630,7 +704,9 @@ printf "FFmpeg 4.2.2... "
|
|||
rm -rf "ffmpeg-4.2.2-win${BITS}-dev"
|
||||
fi
|
||||
export FFMPEG_HOME="$(real_pwd)/FFmpeg"
|
||||
add_runtime_dlls "$(pwd)/FFmpeg/bin/"{avcodec-58,avformat-58,avutil-56,swresample-3,swscale-5}.dll
|
||||
for config in ${CONFIGURATIONS[@]}; do
|
||||
add_runtime_dlls $config "$(pwd)/FFmpeg/bin/"{avcodec-58,avformat-58,avutil-56,swresample-3,swscale-5}.dll
|
||||
done
|
||||
if [ $BITS -eq 32 ]; then
|
||||
add_cmake_opts "-DCMAKE_EXE_LINKER_FLAGS=\"/machine:X86 /safeseh:no\""
|
||||
fi
|
||||
|
@ -655,14 +731,16 @@ printf "MyGUI 3.4.0... "
|
|||
mv "MyGUI-3.4.0-msvc${MSVC_REAL_YEAR}-win${BITS}" MyGUI
|
||||
fi
|
||||
export MYGUI_HOME="$(real_pwd)/MyGUI"
|
||||
if [ $CONFIGURATION == "Debug" ]; then
|
||||
SUFFIX="_d"
|
||||
MYGUI_CONFIGURATION="Debug"
|
||||
else
|
||||
SUFFIX=""
|
||||
MYGUI_CONFIGURATION="RelWithDebInfo"
|
||||
fi
|
||||
add_runtime_dlls "$(pwd)/MyGUI/bin/${MYGUI_CONFIGURATION}/MyGUIEngine${SUFFIX}.dll"
|
||||
for CONFIGURATION in ${CONFIGURATIONS[@]}; do
|
||||
if [ $CONFIGURATION == "Debug" ]; then
|
||||
SUFFIX="_d"
|
||||
MYGUI_CONFIGURATION="Debug"
|
||||
else
|
||||
SUFFIX=""
|
||||
MYGUI_CONFIGURATION="RelWithDebInfo"
|
||||
fi
|
||||
add_runtime_dlls $CONFIGURATION "$(pwd)/MyGUI/bin/${MYGUI_CONFIGURATION}/MyGUIEngine${SUFFIX}.dll"
|
||||
done
|
||||
echo Done.
|
||||
}
|
||||
cd $DEPS
|
||||
|
@ -679,7 +757,9 @@ printf "OpenAL-Soft 1.20.1... "
|
|||
OPENAL_SDK="$(real_pwd)/openal-soft-1.20.1-bin"
|
||||
add_cmake_opts -DOPENAL_INCLUDE_DIR="${OPENAL_SDK}/include/AL" \
|
||||
-DOPENAL_LIBRARY="${OPENAL_SDK}/libs/Win${BITS}/OpenAL32.lib"
|
||||
add_runtime_dlls "$(pwd)/openal-soft-1.20.1-bin/bin/WIN${BITS}/soft_oal.dll:OpenAL32.dll"
|
||||
for config in ${CONFIGURATIONS[@]}; do
|
||||
add_runtime_dlls $config "$(pwd)/openal-soft-1.20.1-bin/bin/WIN${BITS}/soft_oal.dll:OpenAL32.dll"
|
||||
done
|
||||
echo Done.
|
||||
}
|
||||
cd $DEPS
|
||||
|
@ -702,15 +782,17 @@ printf "OSG 3.6.5... "
|
|||
fi
|
||||
OSG_SDK="$(real_pwd)/OSG"
|
||||
add_cmake_opts -DOSG_DIR="$OSG_SDK"
|
||||
if [ $CONFIGURATION == "Debug" ]; then
|
||||
SUFFIX="d"
|
||||
else
|
||||
SUFFIX=""
|
||||
fi
|
||||
add_runtime_dlls "$(pwd)/OSG/bin/"{OpenThreads,zlib,libpng}${SUFFIX}.dll \
|
||||
"$(pwd)/OSG/bin/osg"{,Animation,DB,FX,GA,Particle,Text,Util,Viewer,Shadow}${SUFFIX}.dll
|
||||
add_osg_dlls "$(pwd)/OSG/bin/osgPlugins-3.6.5/osgdb_"{bmp,dds,freetype,jpeg,osg,png,tga}${SUFFIX}.dll
|
||||
add_osg_dlls "$(pwd)/OSG/bin/osgPlugins-3.6.5/osgdb_serializers_osg"{,animation,fx,ga,particle,text,util,viewer,shadow}${SUFFIX}.dll
|
||||
for CONFIGURATION in ${CONFIGURATIONS[@]}; do
|
||||
if [ $CONFIGURATION == "Debug" ]; then
|
||||
SUFFIX="d"
|
||||
else
|
||||
SUFFIX=""
|
||||
fi
|
||||
add_runtime_dlls $CONFIGURATION "$(pwd)/OSG/bin/"{OpenThreads,zlib,libpng}${SUFFIX}.dll \
|
||||
"$(pwd)/OSG/bin/osg"{,Animation,DB,FX,GA,Particle,Text,Util,Viewer,Shadow}${SUFFIX}.dll
|
||||
add_osg_dlls $CONFIGURATION "$(pwd)/OSG/bin/osgPlugins-3.6.5/osgdb_"{bmp,dds,freetype,jpeg,osg,png,tga}${SUFFIX}.dll
|
||||
add_osg_dlls $CONFIGURATION "$(pwd)/OSG/bin/osgPlugins-3.6.5/osgdb_serializers_osg"{,animation,fx,ga,particle,text,util,viewer,shadow}${SUFFIX}.dll
|
||||
done
|
||||
echo Done.
|
||||
}
|
||||
cd $DEPS
|
||||
|
@ -782,26 +864,30 @@ fi
|
|||
cd $QT_SDK
|
||||
add_cmake_opts -DQT_QMAKE_EXECUTABLE="${QT_SDK}/bin/qmake.exe" \
|
||||
-DCMAKE_PREFIX_PATH="$QT_SDK"
|
||||
if [ $CONFIGURATION == "Debug" ]; then
|
||||
SUFFIX="d"
|
||||
else
|
||||
SUFFIX=""
|
||||
fi
|
||||
add_runtime_dlls "$(pwd)/bin/Qt5"{Core,Gui,Network,OpenGL,Widgets}${SUFFIX}.dll
|
||||
add_qt_platform_dlls "$(pwd)/plugins/platforms/qwindows${SUFFIX}.dll"
|
||||
for CONFIGURATION in ${CONFIGURATIONS[@]}; do
|
||||
if [ $CONFIGURATION == "Debug" ]; then
|
||||
DLLSUFFIX="d"
|
||||
else
|
||||
DLLSUFFIX=""
|
||||
fi
|
||||
add_runtime_dlls $CONFIGURATION "$(pwd)/bin/Qt5"{Core,Gui,Network,OpenGL,Widgets}${DLLSUFFIX}.dll
|
||||
add_qt_platform_dlls $CONFIGURATION "$(pwd)/plugins/platforms/qwindows${DLLSUFFIX}.dll"
|
||||
done
|
||||
echo Done.
|
||||
else
|
||||
QT_SDK="C:/Qt/5.13/msvc2017${SUFFIX}"
|
||||
add_cmake_opts -DQT_QMAKE_EXECUTABLE="${QT_SDK}/bin/qmake.exe" \
|
||||
-DCMAKE_PREFIX_PATH="$QT_SDK"
|
||||
if [ $CONFIGURATION == "Debug" ]; then
|
||||
SUFFIX="d"
|
||||
else
|
||||
SUFFIX=""
|
||||
fi
|
||||
DIR=$(windowsPathAsUnix "${QT_SDK}")
|
||||
add_runtime_dlls "${DIR}/bin/Qt5"{Core,Gui,Network,OpenGL,Widgets}${SUFFIX}.dll
|
||||
add_qt_platform_dlls "${DIR}/plugins/platforms/qwindows${SUFFIX}.dll"
|
||||
for CONFIGURATION in ${CONFIGURATIONS[@]}; do
|
||||
if [ $CONFIGURATION == "Debug" ]; then
|
||||
DLLSUFFIX="d"
|
||||
else
|
||||
DLLSUFFIX=""
|
||||
fi
|
||||
DIR=$(windowsPathAsUnix "${QT_SDK}")
|
||||
add_runtime_dlls $CONFIGURATION "${DIR}/bin/Qt5"{Core,Gui,Network,OpenGL,Widgets}${DLLSUFFIX}.dll
|
||||
add_qt_platform_dlls $CONFIGURATION "${DIR}/plugins/platforms/qwindows${DLLSUFFIX}.dll"
|
||||
done
|
||||
echo Done.
|
||||
fi
|
||||
}
|
||||
|
@ -817,7 +903,34 @@ printf "SDL 2.0.12... "
|
|||
eval 7z x -y SDL2-2.0.12.zip $STRIP
|
||||
fi
|
||||
export SDL2DIR="$(real_pwd)/SDL2-2.0.12"
|
||||
add_runtime_dlls "$(pwd)/SDL2-2.0.12/lib/x${ARCHSUFFIX}/SDL2.dll"
|
||||
for config in ${CONFIGURATIONS[@]}; do
|
||||
add_runtime_dlls $config "$(pwd)/SDL2-2.0.12/lib/x${ARCHSUFFIX}/SDL2.dll"
|
||||
done
|
||||
echo Done.
|
||||
}
|
||||
cd $DEPS
|
||||
echo
|
||||
# LZ4
|
||||
printf "LZ4 1.9.2... "
|
||||
{
|
||||
if [ -d LZ4_1.9.2 ]; then
|
||||
printf "Exists. "
|
||||
elif [ -z $SKIP_EXTRACT ]; then
|
||||
rm -rf LZ4_1.9.2
|
||||
eval 7z x -y lz4_win${BITS}_v1_9_2.7z -o./LZ4_1.9.2 $STRIP
|
||||
fi
|
||||
export LZ4DIR="$(real_pwd)/LZ4_1.9.2"
|
||||
add_cmake_opts -DLZ4_INCLUDE_DIR="${LZ4DIR}/include" \
|
||||
-DLZ4_LIBRARY="${LZ4DIR}/lib/liblz4.lib"
|
||||
for CONFIGURATION in ${CONFIGURATIONS[@]}; do
|
||||
if [ $CONFIGURATION == "Debug" ]; then
|
||||
LZ4_CONFIGURATION="Debug"
|
||||
else
|
||||
SUFFIX=""
|
||||
LZ4_CONFIGURATION="Release"
|
||||
fi
|
||||
add_runtime_dlls $CONFIGURATION "$(pwd)/LZ4_1.9.2/bin/${LZ4_CONFIGURATION}/liblz4.dll"
|
||||
done
|
||||
echo Done.
|
||||
}
|
||||
cd $DEPS
|
||||
|
@ -828,41 +941,51 @@ if [ ! -z $TEST_FRAMEWORK ]; then
|
|||
printf "Google test 1.10.0 ..."
|
||||
|
||||
cd googletest
|
||||
if [ ! -d build ]; then
|
||||
mkdir build
|
||||
fi
|
||||
mkdir -p build${MSVC_REAL_YEAR}
|
||||
|
||||
cd build
|
||||
cd build${MSVC_REAL_YEAR}
|
||||
|
||||
GOOGLE_INSTALL_ROOT="${DEPS_INSTALL}/GoogleTest"
|
||||
if [ $CONFIGURATION == "Debug" ]; then
|
||||
|
||||
for CONFIGURATION in ${CONFIGURATIONS[@]}; do
|
||||
# FindGMock.cmake mentions Release explicitly, but not RelWithDebInfo. Only one optimised library config can be used, so go for the safer one.
|
||||
GTEST_CONFIG=$([ $CONFIGURATION == "RelWithDebInfo" ] && echo "Release" || echo "$CONFIGURATION" )
|
||||
if [ $GTEST_CONFIG == "Debug" ]; then
|
||||
DEBUG_SUFFIX="d"
|
||||
else
|
||||
DEBUG_SUFFIX=""
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d $GOOGLE_INSTALL_ROOT ]; then
|
||||
if [ ! -f "$GOOGLE_INSTALL_ROOT/lib/gtest${DEBUG_SUFFIX}.lib" ]; then
|
||||
# Always use MSBuild solution files as they don't need the environment activating
|
||||
cmake .. -DCMAKE_USE_WIN32_THREADS_INIT=1 -G "Visual Studio $MSVC_REAL_VER $MSVC_REAL_YEAR$([ $BITS -eq 64 ] && [ $MSVC_REAL_VER -lt 16 ] && echo " Win64")" $([ $MSVC_REAL_VER -ge 16 ] && echo "-A $([ $BITS -eq 64 ] && echo "x64" || echo "Win32")") -DBUILD_SHARED_LIBS=1
|
||||
cmake --build . --config "${GTEST_CONFIG}"
|
||||
cmake --install . --config "${GTEST_CONFIG}" --prefix "${GOOGLE_INSTALL_ROOT}"
|
||||
fi
|
||||
|
||||
cmake .. -DCMAKE_BUILD_TYPE="${CONFIGURATION}" -DCMAKE_INSTALL_PREFIX="${GOOGLE_INSTALL_ROOT}" -DCMAKE_USE_WIN32_THREADS_INIT=1 -G "${GENERATOR}" -DBUILD_SHARED_LIBS=1
|
||||
cmake --build . --config "${CONFIGURATION}"
|
||||
cmake --build . --target install --config "${CONFIGURATION}"
|
||||
|
||||
add_runtime_dlls "${GOOGLE_INSTALL_ROOT}\bin\gtest_main${DEBUG_SUFFIX}.dll"
|
||||
add_runtime_dlls "${GOOGLE_INSTALL_ROOT}\bin\gtest${DEBUG_SUFFIX}.dll"
|
||||
add_runtime_dlls "${GOOGLE_INSTALL_ROOT}\bin\gmock_main${DEBUG_SUFFIX}.dll"
|
||||
add_runtime_dlls "${GOOGLE_INSTALL_ROOT}\bin\gmock${DEBUG_SUFFIX}.dll"
|
||||
fi
|
||||
add_runtime_dlls $CONFIGURATION "${GOOGLE_INSTALL_ROOT}\bin\gtest_main${DEBUG_SUFFIX}.dll"
|
||||
add_runtime_dlls $CONFIGURATION "${GOOGLE_INSTALL_ROOT}\bin\gtest${DEBUG_SUFFIX}.dll"
|
||||
add_runtime_dlls $CONFIGURATION "${GOOGLE_INSTALL_ROOT}\bin\gmock_main${DEBUG_SUFFIX}.dll"
|
||||
add_runtime_dlls $CONFIGURATION "${GOOGLE_INSTALL_ROOT}\bin\gmock${DEBUG_SUFFIX}.dll"
|
||||
done
|
||||
|
||||
add_cmake_opts -DBUILD_UNITTESTS=yes
|
||||
# FindGTest and FindGMock do not work perfectly on Windows
|
||||
# but we can help them by telling them everything we know about installation
|
||||
add_cmake_opts -DGMOCK_ROOT="$GOOGLE_INSTALL_ROOT"
|
||||
add_cmake_opts -DGTEST_ROOT="$GOOGLE_INSTALL_ROOT"
|
||||
add_cmake_opts -DGTEST_LIBRARY="$GOOGLE_INSTALL_ROOT/lib/gtest${DEBUG_SUFFIX}.lib"
|
||||
add_cmake_opts -DGTEST_MAIN_LIBRARY="$GOOGLE_INSTALL_ROOT/lib/gtest_main${DEBUG_SUFFIX}.lib"
|
||||
add_cmake_opts -DGMOCK_LIBRARY="$GOOGLE_INSTALL_ROOT/lib/gmock${DEBUG_SUFFIX}.lib"
|
||||
add_cmake_opts -DGMOCK_MAIN_LIBRARY="$GOOGLE_INSTALL_ROOT/lib/gmock_main${DEBUG_SUFFIX}.lib"
|
||||
add_cmake_opts -DGTEST_LIBRARY="$GOOGLE_INSTALL_ROOT/lib/gtest.lib"
|
||||
add_cmake_opts -DGTEST_MAIN_LIBRARY="$GOOGLE_INSTALL_ROOT/lib/gtest_main.lib"
|
||||
add_cmake_opts -DGMOCK_LIBRARY="$GOOGLE_INSTALL_ROOT/lib/gmock.lib"
|
||||
add_cmake_opts -DGMOCK_MAIN_LIBRARY="$GOOGLE_INSTALL_ROOT/lib/gmock_main.lib"
|
||||
add_cmake_opts -DGTEST_LIBRARY_DEBUG="$GOOGLE_INSTALL_ROOT/lib/gtestd.lib"
|
||||
add_cmake_opts -DGTEST_MAIN_LIBRARY_DEBUG="$GOOGLE_INSTALL_ROOT/lib/gtest_maind.lib"
|
||||
add_cmake_opts -DGMOCK_LIBRARY_DEBUG="$GOOGLE_INSTALL_ROOT/lib/gmockd.lib"
|
||||
add_cmake_opts -DGMOCK_MAIN_LIBRARY_DEBUG="$GOOGLE_INSTALL_ROOT/lib/gmock_maind.lib"
|
||||
add_cmake_opts -DGTEST_LINKED_AS_SHARED_LIBRARY=True
|
||||
add_cmake_opts -DGTEST_LIBRARY_TYPE=SHARED
|
||||
add_cmake_opts -DGTEST_MAIN_LIBRARY_TYPE=SHARED
|
||||
|
||||
echo Done.
|
||||
|
||||
fi
|
||||
|
@ -926,45 +1049,47 @@ if [ ! -z $CI ]; then
|
|||
fi
|
||||
# NOTE: Disable this when/if we want to run test cases
|
||||
#if [ -z $CI ]; then
|
||||
echo "- Copying Runtime DLLs..."
|
||||
DLL_PREFIX=""
|
||||
if [ -z $SINGLE_CONFIG ]; then
|
||||
mkdir -p $BUILD_CONFIG
|
||||
DLL_PREFIX="$BUILD_CONFIG/"
|
||||
fi
|
||||
for DLL in $RUNTIME_DLLS; do
|
||||
TARGET="$(basename "$DLL")"
|
||||
if [[ "$DLL" == *":"* ]]; then
|
||||
originalIFS="$IFS"
|
||||
IFS=':'; SPLIT=( ${DLL} ); IFS=$originalIFS
|
||||
DLL=${SPLIT[0]}
|
||||
TARGET=${SPLIT[1]}
|
||||
for CONFIGURATION in ${CONFIGURATIONS[@]}; do
|
||||
echo "- Copying Runtime DLLs for $CONFIGURATION..."
|
||||
DLL_PREFIX=""
|
||||
if [ -z $SINGLE_CONFIG ]; then
|
||||
mkdir -p $CONFIGURATION
|
||||
DLL_PREFIX="$CONFIGURATION/"
|
||||
fi
|
||||
echo " ${TARGET}."
|
||||
cp "$DLL" "${DLL_PREFIX}$TARGET"
|
||||
for DLL in ${RUNTIME_DLLS[$CONFIGURATION]}; do
|
||||
TARGET="$(basename "$DLL")"
|
||||
if [[ "$DLL" == *":"* ]]; then
|
||||
originalIFS="$IFS"
|
||||
IFS=':'; SPLIT=( ${DLL} ); IFS=$originalIFS
|
||||
DLL=${SPLIT[0]}
|
||||
TARGET=${SPLIT[1]}
|
||||
fi
|
||||
echo " ${TARGET}."
|
||||
cp "$DLL" "${DLL_PREFIX}$TARGET"
|
||||
done
|
||||
echo
|
||||
echo "- OSG Plugin DLLs..."
|
||||
mkdir -p ${DLL_PREFIX}osgPlugins-3.6.5
|
||||
for DLL in ${OSG_PLUGINS[$CONFIGURATION]}; do
|
||||
echo " $(basename $DLL)."
|
||||
cp "$DLL" ${DLL_PREFIX}osgPlugins-3.6.5
|
||||
done
|
||||
echo
|
||||
echo "- Qt Platform DLLs..."
|
||||
mkdir -p ${DLL_PREFIX}platforms
|
||||
for DLL in ${QT_PLATFORMS[$CONFIGURATION]}; do
|
||||
echo " $(basename $DLL)"
|
||||
cp "$DLL" "${DLL_PREFIX}platforms"
|
||||
done
|
||||
echo
|
||||
done
|
||||
echo
|
||||
echo "- OSG Plugin DLLs..."
|
||||
mkdir -p ${DLL_PREFIX}osgPlugins-3.6.5
|
||||
for DLL in $OSG_PLUGINS; do
|
||||
echo " $(basename $DLL)."
|
||||
cp "$DLL" ${DLL_PREFIX}osgPlugins-3.6.5
|
||||
done
|
||||
echo
|
||||
echo "- Qt Platform DLLs..."
|
||||
mkdir -p ${DLL_PREFIX}platforms
|
||||
for DLL in $QT_PLATFORMS; do
|
||||
echo " $(basename $DLL)"
|
||||
cp "$DLL" "${DLL_PREFIX}platforms"
|
||||
done
|
||||
echo
|
||||
#fi
|
||||
|
||||
if [ -n "$ACTIVATE_MSVC" ]; then
|
||||
echo -n "- Activating MSVC in the current shell... "
|
||||
command -v vswhere >/dev/null 2>&1 || { echo "Error: vswhere is not on the path."; wrappedExit 1; }
|
||||
|
||||
MSVC_INSTALLATION_PATH=$(vswhere -legacy -products '*' -version "[$MSVC_VER,$(awk "BEGIN { print $MSVC_REAL_VER + 1; exit }"))" -property installationPath)
|
||||
MSVC_INSTALLATION_PATH=$(vswhere -products '*' -version "[$MSVC_REAL_VER,$(awk "BEGIN { print $MSVC_REAL_VER + 1; exit }"))" -property installationPath)
|
||||
if [ -z "$MSVC_INSTALLATION_PATH" ]; then
|
||||
echo "vswhere was unable to find MSVC $MSVC_DISPLAY_YEAR"
|
||||
wrappedExit 1
|
||||
|
|
|
@ -13,14 +13,14 @@ cmake \
|
|||
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \
|
||||
-D CMAKE_C_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE" \
|
||||
-D CMAKE_CXX_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE" \
|
||||
-D CMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" \
|
||||
-D CMAKE_CXX_FLAGS="-stdlib=libc++" \
|
||||
-D CMAKE_C_FLAGS_RELEASE="-g -O0" \
|
||||
-D CMAKE_CXX_FLAGS_RELEASE="-g -O0" \
|
||||
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.9" \
|
||||
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.12" \
|
||||
-D CMAKE_BUILD_TYPE=RELEASE \
|
||||
-D OPENMW_OSX_DEPLOYMENT=TRUE \
|
||||
-D BUILD_OPENMW=TRUE \
|
||||
-D BUILD_OPENCS=FALSE \
|
||||
-D BUILD_OPENCS=TRUE \
|
||||
-D BUILD_ESMTOOL=TRUE \
|
||||
-D BUILD_BSATOOL=TRUE \
|
||||
-D BUILD_ESSIMPORTER=TRUE \
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#!/bin/sh -e
|
||||
#!/bin/sh -ex
|
||||
|
||||
git clone -b release-1.10.0 https://github.com/google/googletest.git
|
||||
cd googletest
|
||||
mkdir build
|
||||
cd build
|
||||
cmake \
|
||||
-D CMAKE_C_COMPILER="${CC}" \
|
||||
-D CMAKE_CXX_COMPILER="${CXX}" \
|
||||
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-D CMAKE_BUILD_TYPE="${CONFIGURATION}" \
|
||||
-D CMAKE_INSTALL_PREFIX=. \
|
||||
-D CMAKE_INSTALL_PREFIX="${GOOGLETEST_DIR}" \
|
||||
-G "${GENERATOR}" \
|
||||
..
|
||||
cmake --build . --config "${CONFIGURATION}"
|
||||
cmake --build . --target install --config "${CONFIGURATION}"
|
||||
cmake --build . --config "${CONFIGURATION}" -- -j $(nproc)
|
||||
cmake --install . --config "${CONFIGURATION}"
|
||||
|
|
368
CMakeLists.txt
368
CMakeLists.txt
|
@ -1,3 +1,11 @@
|
|||
project(OpenMW)
|
||||
cmake_minimum_required(VERSION 3.1.0)
|
||||
|
||||
# for link time optimization, remove if cmake version is >= 3.9
|
||||
if(POLICY CMP0069)
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
endif()
|
||||
|
||||
# Apps and tools
|
||||
option(BUILD_OPENMW "Build OpenMW" ON)
|
||||
option(BUILD_LAUNCHER "Build Launcher" ON)
|
||||
|
@ -14,17 +22,14 @@ option(BUILD_WITH_CODE_COVERAGE "Enable code coverage with gconv" OFF)
|
|||
option(BUILD_UNITTESTS "Enable Unittests with Google C++ Unittest" OFF)
|
||||
option(BULLET_USE_DOUBLES "Use double precision for Bullet" OFF)
|
||||
|
||||
set(OpenGL_GL_PREFERENCE LEGACY) # Use LEGACY as we use GL2; GLNVD is for GL3 and up.
|
||||
|
||||
if (NOT BUILD_LAUNCHER AND NOT BUILD_OPENCS AND NOT BUILD_WIZARD)
|
||||
set(USE_QT FALSE)
|
||||
else()
|
||||
set(USE_QT TRUE)
|
||||
endif()
|
||||
|
||||
# set the minimum required version across the board
|
||||
cmake_minimum_required(VERSION 3.1.0)
|
||||
|
||||
project(OpenMW)
|
||||
|
||||
# If the user doesn't supply a CMAKE_BUILD_TYPE via command line, choose one for them.
|
||||
IF(NOT CMAKE_BUILD_TYPE)
|
||||
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
||||
|
@ -59,7 +64,7 @@ set(OPENMW_VERSION_COMMITDATE "")
|
|||
|
||||
set(OPENMW_VERSION "${OPENMW_VERSION_MAJOR}.${OPENMW_VERSION_MINOR}.${OPENMW_VERSION_RELEASE}")
|
||||
|
||||
set(OPENMW_DOC_BASEURL "https://openmw.readthedocs.io/en/master/")
|
||||
set(OPENMW_DOC_BASEURL "https://openmw.readthedocs.io/en/stable/")
|
||||
|
||||
set(GIT_CHECKOUT FALSE)
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
|
||||
|
@ -98,6 +103,7 @@ option(OSG_STATIC "Link static build of OpenSceneGraph into the binaries" FALSE)
|
|||
option(QT_STATIC "Link static build of QT into the binaries" FALSE)
|
||||
|
||||
option(OPENMW_UNITY_BUILD "Use fewer compilation units to speed up compile time" FALSE)
|
||||
option(OPENMW_LTO_BUILD "Build OpenMW with Link-Time Optimization (Needs ~2GB of RAM)" OFF)
|
||||
|
||||
# what is necessary to build documentation
|
||||
IF( BUILD_DOCS )
|
||||
|
@ -111,7 +117,6 @@ option(OPENMW_OSX_DEPLOYMENT OFF)
|
|||
|
||||
if (MSVC)
|
||||
option(OPENMW_MP_BUILD "Build OpenMW with /MP flag" OFF)
|
||||
option(OPENMW_LTO_BUILD "Build OpenMW with Link-Time Optimization (Needs ~2GB of RAM)" OFF)
|
||||
endif()
|
||||
|
||||
# Set up common paths
|
||||
|
@ -148,6 +153,8 @@ endif()
|
|||
# Dependencies
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
find_package(LZ4 REQUIRED)
|
||||
|
||||
if (USE_QT)
|
||||
find_package(Qt5Core 5.12 REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
|
@ -388,9 +395,29 @@ if (NOT WIN32 AND NOT APPLE)
|
|||
endif()
|
||||
|
||||
# CXX Compiler settings
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
if(OPENMW_LTO_BUILD)
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.9)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT HAVE_IPO OUTPUT HAVE_IPO_OUTPUT)
|
||||
if(HAVE_IPO)
|
||||
message(STATUS "LTO enabled for Release configuration.")
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
|
||||
else()
|
||||
message(WARNING "Requested option OPENMW_LTO_BUILD not supported by this compiler: ${HAVE_IPO_OUTPUT}")
|
||||
if(MSVC)
|
||||
message(STATUS "Note: Flags used to be set manually for this setting with MSVC. We now rely on CMake for this. Upgrade CMake to at least 3.13 to re-enable this setting.")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "Requested option OPENMW_LTO_BUILD not supported by this cmake version: ${CMAKE_VERSION}. Upgrade CMake to at least 3.9 to enable support for certain compilers. Newer CMake versions support more compilers.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -std=c++14 -pedantic -Wno-long-long")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -pedantic -Wno-long-long")
|
||||
add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON )
|
||||
|
||||
if (APPLE)
|
||||
|
@ -407,166 +434,14 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
|||
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.6)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-parameter")
|
||||
endif()
|
||||
elseif (MSVC)
|
||||
# Enable link-time code generation globally for all linking
|
||||
if (OPENMW_LTO_BUILD)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5.0)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override")
|
||||
endif()
|
||||
elseif (MSVC)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE")
|
||||
endif (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
|
||||
IF(NOT WIN32 AND NOT APPLE)
|
||||
# Linux installation
|
||||
|
||||
# Install binaries
|
||||
IF(BUILD_OPENMW)
|
||||
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/openmw" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_OPENMW)
|
||||
IF(BUILD_LAUNCHER)
|
||||
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/openmw-launcher" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_LAUNCHER)
|
||||
IF(BUILD_BSATOOL)
|
||||
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/bsatool" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_BSATOOL)
|
||||
IF(BUILD_ESMTOOL)
|
||||
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/esmtool" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_ESMTOOL)
|
||||
IF(BUILD_NIFTEST)
|
||||
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/niftest" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_NIFTEST)
|
||||
IF(BUILD_MWINIIMPORTER)
|
||||
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/openmw-iniimporter" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_MWINIIMPORTER)
|
||||
IF(BUILD_ESSIMPORTER)
|
||||
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/openmw-essimporter" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_ESSIMPORTER)
|
||||
IF(BUILD_OPENCS)
|
||||
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/openmw-cs" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_OPENCS)
|
||||
IF(BUILD_WIZARD)
|
||||
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/openmw-wizard" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_WIZARD)
|
||||
|
||||
# Install licenses
|
||||
INSTALL(FILES "files/mygui/DejaVu Font License.txt" DESTINATION "${LICDIR}" )
|
||||
|
||||
# Install icon and desktop file
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/org.openmw.launcher.desktop" DESTINATION "${DATAROOTDIR}/applications" COMPONENT "openmw")
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/files/launcher/images/openmw.png" DESTINATION "${ICONDIR}" COMPONENT "openmw")
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.appdata.xml" DESTINATION "${DATAROOTDIR}/metainfo" COMPONENT "openmw")
|
||||
IF(BUILD_OPENCS)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/org.openmw.cs.desktop" DESTINATION "${DATAROOTDIR}/applications" COMPONENT "opencs")
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/files/opencs/openmw-cs.png" DESTINATION "${ICONDIR}" COMPONENT "opencs")
|
||||
ENDIF(BUILD_OPENCS)
|
||||
|
||||
# Install global configuration files
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "${SYSCONFDIR}" COMPONENT "openmw")
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "${SYSCONFDIR}" RENAME "openmw.cfg" COMPONENT "openmw")
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/resources/version" DESTINATION "${SYSCONFDIR}" COMPONENT "openmw")
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/gamecontrollerdb.txt" DESTINATION "${SYSCONFDIR}" COMPONENT "openmw")
|
||||
|
||||
IF(BUILD_OPENCS)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw-cs.cfg" DESTINATION "${SYSCONFDIR}" COMPONENT "opencs")
|
||||
ENDIF(BUILD_OPENCS)
|
||||
|
||||
# Install resources
|
||||
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION "${DATADIR}" COMPONENT "Resources")
|
||||
INSTALL(DIRECTORY DESTINATION "${DATADIR}/data" COMPONENT "Resources")
|
||||
ENDIF(NOT WIN32 AND NOT APPLE)
|
||||
|
||||
if(WIN32)
|
||||
FILE(GLOB dll_files_debug "${OpenMW_BINARY_DIR}/Debug/*.dll")
|
||||
FILE(GLOB dll_files_release "${OpenMW_BINARY_DIR}/Release/*.dll")
|
||||
INSTALL(FILES ${dll_files_debug} DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(FILES ${dll_files_release} DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Debug/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg" CONFIGURATIONS Debug)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Release/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg" CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/CHANGELOG.md" DESTINATION "." RENAME "CHANGELOG.txt")
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/README.md" DESTINATION "." RENAME "README.txt")
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/LICENSE" DESTINATION "." RENAME "LICENSE.txt")
|
||||
INSTALL(FILES
|
||||
"${OpenMW_SOURCE_DIR}/files/mygui/DejaVu Font License.txt"
|
||||
DESTINATION ".")
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Debug/settings-default.cfg" DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Release/settings-default.cfg" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Debug/gamecontrollerdb.txt" DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Release/gamecontrollerdb.txt" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
|
||||
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/Debug/platforms" DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/Release/platforms" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
|
||||
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/Debug/resources" DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/Release/resources" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
|
||||
FILE(GLOB plugin_dir_debug "${OpenMW_BINARY_DIR}/Debug/osgPlugins-*")
|
||||
FILE(GLOB plugin_dir_release "${OpenMW_BINARY_DIR}/Release/osgPlugins-*")
|
||||
INSTALL(DIRECTORY ${plugin_dir_debug} DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(DIRECTORY ${plugin_dir_release} DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
|
||||
SET(CPACK_GENERATOR "NSIS")
|
||||
SET(CPACK_PACKAGE_NAME "OpenMW")
|
||||
SET(CPACK_PACKAGE_VENDOR "OpenMW.org")
|
||||
SET(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR ${OPENMW_VERSION_MAJOR})
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINOR})
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW")
|
||||
IF(BUILD_LAUNCHER)
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${CPACK_PACKAGE_EXECUTABLES};openmw-launcher;OpenMW Launcher")
|
||||
ENDIF(BUILD_LAUNCHER)
|
||||
IF(BUILD_OPENCS)
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${CPACK_PACKAGE_EXECUTABLES};openmw-cs;OpenMW Construction Set")
|
||||
ENDIF(BUILD_OPENCS)
|
||||
IF(BUILD_WIZARD)
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${CPACK_PACKAGE_EXECUTABLES};openmw-wizard;OpenMW Wizard")
|
||||
ENDIF(BUILD_WIZARD)
|
||||
SET(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Readme.lnk' '\$INSTDIR\\\\README.txt'")
|
||||
SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
|
||||
Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Readme.lnk\\\"
|
||||
")
|
||||
SET(CPACK_RESOURCE_FILE_README "${OpenMW_SOURCE_DIR}/README.md")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OpenMW_SOURCE_DIR}/README.md")
|
||||
SET(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
|
||||
SET(CPACK_NSIS_DISPLAY_NAME "OpenMW ${OPENMW_VERSION}")
|
||||
SET(CPACK_NSIS_HELP_LINK "https:\\\\\\\\www.openmw.org")
|
||||
SET(CPACK_NSIS_URL_INFO_ABOUT "https:\\\\\\\\www.openmw.org")
|
||||
SET(CPACK_NSIS_INSTALLED_ICON_NAME "openmw-launcher.exe")
|
||||
SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "openmw-launcher.exe")
|
||||
SET(CPACK_NSIS_MUI_ICON "${OpenMW_SOURCE_DIR}/files/windows/openmw.ico")
|
||||
SET(CPACK_NSIS_MUI_UNIICON "${OpenMW_SOURCE_DIR}/files/windows/openmw.ico")
|
||||
SET(CPACK_PACKAGE_ICON "${OpenMW_SOURCE_DIR}\\\\files\\\\openmw.bmp")
|
||||
|
||||
SET(VCREDIST32 "${OpenMW_BINARY_DIR}/vcredist_x86.exe")
|
||||
if(EXISTS ${VCREDIST32})
|
||||
INSTALL(FILES ${VCREDIST32} DESTINATION "redist")
|
||||
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\redist\\\\vcredist_x86.exe\\\" /q'" )
|
||||
endif(EXISTS ${VCREDIST32})
|
||||
|
||||
SET(VCREDIST64 "${OpenMW_BINARY_DIR}/vcredist_x64.exe")
|
||||
if(EXISTS ${VCREDIST64})
|
||||
INSTALL(FILES ${VCREDIST64} DESTINATION "redist")
|
||||
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\redist\\\\vcredist_x64.exe\\\" /q'" )
|
||||
endif(EXISTS ${VCREDIST64})
|
||||
|
||||
SET(OALREDIST "${OpenMW_BINARY_DIR}/oalinst.exe")
|
||||
if(EXISTS ${OALREDIST})
|
||||
INSTALL(FILES ${OALREDIST} DESTINATION "redist")
|
||||
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
|
||||
ExecWait '\\\"$INSTDIR\\\\redist\\\\oalinst.exe\\\" /s'" )
|
||||
endif(EXISTS ${OALREDIST})
|
||||
|
||||
if(CMAKE_CL_64)
|
||||
SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
endif(WIN32)
|
||||
|
||||
# Extern
|
||||
set(RECASTNAVIGATION_STATIC ON CACHE BOOL "Build recastnavigation static libraries")
|
||||
|
||||
|
@ -735,6 +610,10 @@ if (WIN32)
|
|||
|
||||
set_target_properties(components PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
||||
set_target_properties(osg-ffmpeg-videoplayer PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
||||
|
||||
if (MSVC_VERSION GREATER_EQUAL 1915 AND MSVC_VERSION LESS 1920)
|
||||
target_compile_definitions(components INTERFACE _ENABLE_EXTENDED_ALIGNED_STORAGE)
|
||||
endif()
|
||||
|
||||
if (BUILD_BSATOOL)
|
||||
set_target_properties(bsatool PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
||||
|
@ -886,7 +765,164 @@ if (OPENMW_OSX_DEPLOYMENT AND APPLE)
|
|||
fixup_bundle(\"${INSTALLED_OPENCS_APP}\" \"${OPENCS_PLUGINS}\" \"\")
|
||||
" COMPONENT Runtime)
|
||||
include(CPack)
|
||||
endif ()
|
||||
elseif(NOT APPLE)
|
||||
get_generator_is_multi_config(multi_config)
|
||||
if (multi_config)
|
||||
SET(INSTALL_SOURCE "${OpenMW_BINARY_DIR}/$<CONFIG>")
|
||||
else ()
|
||||
SET(INSTALL_SOURCE "${OpenMW_BINARY_DIR}")
|
||||
endif ()
|
||||
|
||||
if(WIN32)
|
||||
INSTALL(DIRECTORY "${INSTALL_SOURCE}/" DESTINATION "." FILES_MATCHING PATTERN "*.dll"
|
||||
PATTERN "deps" EXCLUDE
|
||||
PATTERN "apps" EXCLUDE
|
||||
PATTERN "CMakeFiles" EXCLUDE
|
||||
PATTERN "components" EXCLUDE
|
||||
PATTERN "docs" EXCLUDE
|
||||
PATTERN "extern" EXCLUDE
|
||||
PATTERN "files" EXCLUDE
|
||||
PATTERN "Testing" EXCLUDE)
|
||||
INSTALL(DIRECTORY "${INSTALL_SOURCE}/" DESTINATION "." CONFIGURATIONS Debug;RelWithDebInfo FILES_MATCHING PATTERN "*.pdb"
|
||||
PATTERN "deps" EXCLUDE
|
||||
PATTERN "apps" EXCLUDE
|
||||
PATTERN "CMakeFiles" EXCLUDE
|
||||
PATTERN "components" EXCLUDE
|
||||
PATTERN "docs" EXCLUDE
|
||||
PATTERN "extern" EXCLUDE
|
||||
PATTERN "files" EXCLUDE
|
||||
PATTERN "Testing" EXCLUDE)
|
||||
INSTALL(FILES "${INSTALL_SOURCE}/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg")
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/CHANGELOG.md" DESTINATION "." RENAME "CHANGELOG.txt")
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/README.md" DESTINATION "." RENAME "README.txt")
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/LICENSE" DESTINATION "." RENAME "LICENSE.txt")
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/files/mygui/DejaVuFontLicense.txt" DESTINATION ".")
|
||||
INSTALL(FILES "${INSTALL_SOURCE}/settings-default.cfg" DESTINATION ".")
|
||||
INSTALL(FILES "${INSTALL_SOURCE}/gamecontrollerdb.txt" DESTINATION ".")
|
||||
|
||||
INSTALL(DIRECTORY "${INSTALL_SOURCE}/resources" DESTINATION ".")
|
||||
|
||||
SET(CPACK_GENERATOR "NSIS")
|
||||
SET(CPACK_PACKAGE_NAME "OpenMW")
|
||||
SET(CPACK_PACKAGE_VENDOR "OpenMW.org")
|
||||
SET(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR ${OPENMW_VERSION_MAJOR})
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINOR})
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW")
|
||||
IF(BUILD_LAUNCHER)
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${CPACK_PACKAGE_EXECUTABLES};openmw-launcher;OpenMW Launcher")
|
||||
ENDIF(BUILD_LAUNCHER)
|
||||
IF(BUILD_OPENCS)
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${CPACK_PACKAGE_EXECUTABLES};openmw-cs;OpenMW Construction Set")
|
||||
ENDIF(BUILD_OPENCS)
|
||||
IF(BUILD_WIZARD)
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${CPACK_PACKAGE_EXECUTABLES};openmw-wizard;OpenMW Wizard")
|
||||
ENDIF(BUILD_WIZARD)
|
||||
SET(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Readme.lnk' '\$INSTDIR\\\\README.txt'")
|
||||
SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
|
||||
Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Readme.lnk\\\"
|
||||
")
|
||||
SET(CPACK_RESOURCE_FILE_README "${OpenMW_SOURCE_DIR}/README.md")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OpenMW_SOURCE_DIR}/README.md")
|
||||
SET(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
|
||||
SET(CPACK_NSIS_DISPLAY_NAME "OpenMW ${OPENMW_VERSION}")
|
||||
SET(CPACK_NSIS_HELP_LINK "https:\\\\\\\\www.openmw.org")
|
||||
SET(CPACK_NSIS_URL_INFO_ABOUT "https:\\\\\\\\www.openmw.org")
|
||||
SET(CPACK_NSIS_INSTALLED_ICON_NAME "openmw-launcher.exe")
|
||||
SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "openmw-launcher.exe")
|
||||
SET(CPACK_NSIS_MUI_ICON "${OpenMW_SOURCE_DIR}/files/windows/openmw.ico")
|
||||
SET(CPACK_NSIS_MUI_UNIICON "${OpenMW_SOURCE_DIR}/files/windows/openmw.ico")
|
||||
SET(CPACK_PACKAGE_ICON "${OpenMW_SOURCE_DIR}\\\\files\\\\openmw.bmp")
|
||||
|
||||
SET(VCREDIST32 "${OpenMW_BINARY_DIR}/vcredist_x86.exe")
|
||||
if(EXISTS ${VCREDIST32})
|
||||
INSTALL(FILES ${VCREDIST32} DESTINATION "redist")
|
||||
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\redist\\\\vcredist_x86.exe\\\" /q'" )
|
||||
endif(EXISTS ${VCREDIST32})
|
||||
|
||||
SET(VCREDIST64 "${OpenMW_BINARY_DIR}/vcredist_x64.exe")
|
||||
if(EXISTS ${VCREDIST64})
|
||||
INSTALL(FILES ${VCREDIST64} DESTINATION "redist")
|
||||
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\redist\\\\vcredist_x64.exe\\\" /q'" )
|
||||
endif(EXISTS ${VCREDIST64})
|
||||
|
||||
SET(OALREDIST "${OpenMW_BINARY_DIR}/oalinst.exe")
|
||||
if(EXISTS ${OALREDIST})
|
||||
INSTALL(FILES ${OALREDIST} DESTINATION "redist")
|
||||
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
|
||||
ExecWait '\\\"$INSTDIR\\\\redist\\\\oalinst.exe\\\" /s'" )
|
||||
endif(EXISTS ${OALREDIST})
|
||||
|
||||
if(CMAKE_CL_64)
|
||||
SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
else(WIN32)
|
||||
# Linux installation
|
||||
|
||||
# Install binaries
|
||||
IF(BUILD_OPENMW)
|
||||
IF(ANDROID)
|
||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/libopenmw.so" DESTINATION "${BINDIR}" )
|
||||
ELSE(ANDROID)
|
||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/openmw" DESTINATION "${BINDIR}" )
|
||||
ENDIF(ANDROID)
|
||||
ENDIF(BUILD_OPENMW)
|
||||
IF(BUILD_LAUNCHER)
|
||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/openmw-launcher" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_LAUNCHER)
|
||||
IF(BUILD_BSATOOL)
|
||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/bsatool" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_BSATOOL)
|
||||
IF(BUILD_ESMTOOL)
|
||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/esmtool" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_ESMTOOL)
|
||||
IF(BUILD_NIFTEST)
|
||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/niftest" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_NIFTEST)
|
||||
IF(BUILD_MWINIIMPORTER)
|
||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/openmw-iniimporter" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_MWINIIMPORTER)
|
||||
IF(BUILD_ESSIMPORTER)
|
||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/openmw-essimporter" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_ESSIMPORTER)
|
||||
IF(BUILD_OPENCS)
|
||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/openmw-cs" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_OPENCS)
|
||||
IF(BUILD_WIZARD)
|
||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/openmw-wizard" DESTINATION "${BINDIR}" )
|
||||
ENDIF(BUILD_WIZARD)
|
||||
|
||||
# Install licenses
|
||||
INSTALL(FILES "files/mygui/DejaVuFontLicense.txt" DESTINATION "${LICDIR}" )
|
||||
|
||||
# Install icon and desktop file
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/org.openmw.launcher.desktop" DESTINATION "${DATAROOTDIR}/applications" COMPONENT "openmw")
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/files/launcher/images/openmw.png" DESTINATION "${ICONDIR}" COMPONENT "openmw")
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.appdata.xml" DESTINATION "${DATAROOTDIR}/metainfo" COMPONENT "openmw")
|
||||
IF(BUILD_OPENCS)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/org.openmw.cs.desktop" DESTINATION "${DATAROOTDIR}/applications" COMPONENT "opencs")
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/files/opencs/openmw-cs.png" DESTINATION "${ICONDIR}" COMPONENT "opencs")
|
||||
ENDIF(BUILD_OPENCS)
|
||||
|
||||
# Install global configuration files
|
||||
INSTALL(FILES "${INSTALL_SOURCE}/settings-default.cfg" DESTINATION "${SYSCONFDIR}" COMPONENT "openmw")
|
||||
INSTALL(FILES "${INSTALL_SOURCE}/openmw.cfg.install" DESTINATION "${SYSCONFDIR}" RENAME "openmw.cfg" COMPONENT "openmw")
|
||||
INSTALL(FILES "${INSTALL_SOURCE}/resources/version" DESTINATION "${SYSCONFDIR}" COMPONENT "openmw")
|
||||
INSTALL(FILES "${INSTALL_SOURCE}/gamecontrollerdb.txt" DESTINATION "${SYSCONFDIR}" COMPONENT "openmw")
|
||||
|
||||
IF(BUILD_OPENCS)
|
||||
INSTALL(FILES "${INSTALL_SOURCE}/openmw-cs.cfg" DESTINATION "${SYSCONFDIR}" COMPONENT "opencs")
|
||||
ENDIF(BUILD_OPENCS)
|
||||
|
||||
# Install resources
|
||||
INSTALL(DIRECTORY "${INSTALL_SOURCE}/resources" DESTINATION "${DATADIR}" COMPONENT "Resources")
|
||||
INSTALL(DIRECTORY DESTINATION "${DATADIR}/data" COMPONENT "Resources")
|
||||
endif(WIN32)
|
||||
endif(OPENMW_OSX_DEPLOYMENT AND APPLE)
|
||||
|
||||
# Doxygen Target -- simply run 'make doc' or 'make doc_pages'
|
||||
# output directory for 'make doc' is "${OpenMW_BINARY_DIR}/docs/Doxygen"
|
||||
|
|
|
@ -13,7 +13,7 @@ OpenMW also comes with OpenMW-CS, a replacement for Bethesda's Construction Set.
|
|||
* IRC: #openmw on irc.freenode.net
|
||||
|
||||
Font Licenses:
|
||||
* DejaVuLGCSansMono.ttf: custom (see [files/mygui/DejaVu Font License.txt](https://github.com/OpenMW/openmw/blob/master/files/mygui/DejaVu%20Font%20License.txt) for more information)
|
||||
* DejaVuLGCSansMono.ttf: custom (see [files/mygui/DejaVuFontLicense.txt](https://github.com/OpenMW/openmw/blob/master/files/mygui/DejaVuFontLicense.txt) for more information)
|
||||
|
||||
Current Status
|
||||
--------------
|
||||
|
|
|
@ -4,9 +4,12 @@
|
|||
#include <components/config/launchersettings.hpp>
|
||||
#include <QFileDialog>
|
||||
#include <QCompleter>
|
||||
#include <QProxyStyle>
|
||||
#include <components/contentselector/view/contentselector.hpp>
|
||||
#include <components/contentselector/model/esmfile.hpp>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
Launcher::AdvancedPage::AdvancedPage(Files::ConfigurationManager &cfg,
|
||||
Config::GameSettings &gameSettings,
|
||||
Settings::Manager &engineSettings, QWidget *parent)
|
||||
|
@ -19,15 +22,15 @@ Launcher::AdvancedPage::AdvancedPage(Files::ConfigurationManager &cfg,
|
|||
setupUi(this);
|
||||
|
||||
loadSettings();
|
||||
mCellNameCompleter.setModel(&mCellNameCompleterModel);
|
||||
startDefaultCharacterAtField->setCompleter(&mCellNameCompleter);
|
||||
}
|
||||
|
||||
void Launcher::AdvancedPage::loadCellsForAutocomplete(QStringList cellNames) {
|
||||
// Set up an auto-completer for the "Start default character at" field
|
||||
auto *completer = new QCompleter(cellNames);
|
||||
completer->setCompletionMode(QCompleter::PopupCompletion);
|
||||
completer->setCaseSensitivity(Qt::CaseSensitivity::CaseInsensitive);
|
||||
startDefaultCharacterAtField->setCompleter(completer);
|
||||
|
||||
// Update the list of suggestions for the "Start default character at" field
|
||||
mCellNameCompleterModel.setStringList(cellNames);
|
||||
mCellNameCompleter.setCompletionMode(QCompleter::PopupCompletion);
|
||||
mCellNameCompleter.setCaseSensitivity(Qt::CaseSensitivity::CaseInsensitive);
|
||||
}
|
||||
|
||||
void Launcher::AdvancedPage::on_skipMenuCheckBox_stateChanged(int state) {
|
||||
|
@ -55,142 +58,276 @@ void Launcher::AdvancedPage::on_runScriptAfterStartupBrowseButton_clicked()
|
|||
runScriptAfterStartupField->setText(path);
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr double CellSizeInUnits = 8192;
|
||||
|
||||
double convertToCells(double unitRadius)
|
||||
{
|
||||
return std::round((unitRadius / 0.93 + 1024) / CellSizeInUnits);
|
||||
}
|
||||
|
||||
double convertToUnits(double CellGridRadius)
|
||||
{
|
||||
return (CellSizeInUnits * CellGridRadius - 1024) * 0.93;
|
||||
}
|
||||
}
|
||||
|
||||
bool Launcher::AdvancedPage::loadSettings()
|
||||
{
|
||||
// Testing
|
||||
bool skipMenu = mGameSettings.value("skip-menu").toInt() == 1;
|
||||
if (skipMenu) {
|
||||
skipMenuCheckBox->setCheckState(Qt::Checked);
|
||||
}
|
||||
startDefaultCharacterAtLabel->setEnabled(skipMenu);
|
||||
startDefaultCharacterAtField->setEnabled(skipMenu);
|
||||
|
||||
startDefaultCharacterAtField->setText(mGameSettings.value("start"));
|
||||
runScriptAfterStartupField->setText(mGameSettings.value("script-run"));
|
||||
|
||||
// Game Settings
|
||||
loadSettingBool(canLootDuringDeathAnimationCheckBox, "can loot during death animation", "Game");
|
||||
loadSettingBool(followersAttackOnSightCheckBox, "followers attack on sight", "Game");
|
||||
loadSettingBool(preventMerchantEquippingCheckBox, "prevent merchant equipping", "Game");
|
||||
loadSettingBool(classicReflectedAbsorbSpellsCheckBox, "classic reflected absorb spells behavior", "Game");
|
||||
loadSettingBool(rebalanceSoulGemValuesCheckBox, "rebalance soul gem values", "Game");
|
||||
loadSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
|
||||
loadSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
|
||||
int unarmedFactorsStrengthIndex = mEngineSettings.getInt("strength influences hand to hand", "Game");
|
||||
if (unarmedFactorsStrengthIndex >= 0 && unarmedFactorsStrengthIndex <= 2)
|
||||
unarmedFactorsStrengthComboBox->setCurrentIndex(unarmedFactorsStrengthIndex);
|
||||
loadSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game");
|
||||
loadSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game");
|
||||
loadSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game");
|
||||
connect(animSourcesCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotAnimSourcesToggled(bool)));
|
||||
loadSettingBool(animSourcesCheckBox, "use additional anim sources", "Game");
|
||||
if (animSourcesCheckBox->checkState())
|
||||
// Game mechanics
|
||||
{
|
||||
loadSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game");
|
||||
loadSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game");
|
||||
loadSettingBool(toggleSneakCheckBox, "toggle sneak", "Input");
|
||||
loadSettingBool(canLootDuringDeathAnimationCheckBox, "can loot during death animation", "Game");
|
||||
loadSettingBool(followersAttackOnSightCheckBox, "followers attack on sight", "Game");
|
||||
loadSettingBool(rebalanceSoulGemValuesCheckBox, "rebalance soul gem values", "Game");
|
||||
loadSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
|
||||
loadSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
|
||||
loadSettingBool(classicReflectedAbsorbSpellsCheckBox, "classic reflected absorb spells behavior", "Game");
|
||||
loadSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game");
|
||||
loadSettingBool(uncappedDamageFatigueCheckBox, "uncapped damage fatigue", "Game");
|
||||
loadSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game");
|
||||
loadSettingBool(swimUpwardCorrectionCheckBox, "swim upward correction", "Game");
|
||||
loadSettingBool(avoidCollisionsCheckBox, "NPCs avoid collisions", "Game");
|
||||
int unarmedFactorsStrengthIndex = mEngineSettings.getInt("strength influences hand to hand", "Game");
|
||||
if (unarmedFactorsStrengthIndex >= 0 && unarmedFactorsStrengthIndex <= 2)
|
||||
unarmedFactorsStrengthComboBox->setCurrentIndex(unarmedFactorsStrengthIndex);
|
||||
loadSettingBool(stealingFromKnockedOutCheckBox, "always allow stealing from knocked out actors", "Game");
|
||||
loadSettingBool(enableNavigatorCheckBox, "enable", "Navigator");
|
||||
int numPhysicsThreads = mEngineSettings.getInt("async num threads", "Physics");
|
||||
if (numPhysicsThreads >= 0)
|
||||
physicsThreadsSpinBox->setValue(numPhysicsThreads);
|
||||
}
|
||||
loadSettingBool(uncappedDamageFatigueCheckBox, "uncapped damage fatigue", "Game");
|
||||
loadSettingBool(trainersTrainingSkillsBasedOnBaseSkillCheckBox, "trainers training skills based on base skill", "Game");
|
||||
|
||||
// Input Settings
|
||||
loadSettingBool(grabCursorCheckBox, "grab cursor", "Input");
|
||||
loadSettingBool(toggleSneakCheckBox, "toggle sneak", "Input");
|
||||
// Visuals
|
||||
{
|
||||
loadSettingBool(autoUseObjectNormalMapsCheckBox, "auto use object normal maps", "Shaders");
|
||||
loadSettingBool(autoUseObjectSpecularMapsCheckBox, "auto use object specular maps", "Shaders");
|
||||
loadSettingBool(autoUseTerrainNormalMapsCheckBox, "auto use terrain normal maps", "Shaders");
|
||||
loadSettingBool(autoUseTerrainSpecularMapsCheckBox, "auto use terrain specular maps", "Shaders");
|
||||
loadSettingBool(bumpMapLocalLightingCheckBox, "apply lighting to environment maps", "Shaders");
|
||||
loadSettingBool(radialFogCheckBox, "radial fog", "Shaders");
|
||||
loadSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game");
|
||||
connect(animSourcesCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotAnimSourcesToggled(bool)));
|
||||
loadSettingBool(animSourcesCheckBox, "use additional anim sources", "Game");
|
||||
if (animSourcesCheckBox->checkState())
|
||||
{
|
||||
loadSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game");
|
||||
loadSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game");
|
||||
}
|
||||
loadSettingBool(turnToMovementDirectionCheckBox, "turn to movement direction", "Game");
|
||||
loadSettingBool(smoothMovementCheckBox, "smooth movement", "Game");
|
||||
|
||||
// Saves Settings
|
||||
loadSettingBool(timePlayedCheckbox, "timeplayed", "Saves");
|
||||
maximumQuicksavesComboBox->setValue(mEngineSettings.getInt("max quicksaves", "Saves"));
|
||||
const bool distantTerrain = mEngineSettings.getBool("distant terrain", "Terrain");
|
||||
const bool objectPaging = mEngineSettings.getBool("object paging", "Terrain");
|
||||
if (distantTerrain && objectPaging) {
|
||||
distantLandCheckBox->setCheckState(Qt::Checked);
|
||||
}
|
||||
|
||||
// User Interface Settings
|
||||
loadSettingBool(showEffectDurationCheckBox, "show effect duration", "Game");
|
||||
loadSettingBool(showEnchantChanceCheckBox, "show enchant chance", "Game");
|
||||
loadSettingBool(showMeleeInfoCheckBox, "show melee info", "Game");
|
||||
loadSettingBool(showProjectileDamageCheckBox, "show projectile damage", "Game");
|
||||
loadSettingBool(changeDialogTopicsCheckBox, "color topic enable", "GUI");
|
||||
int showOwnedIndex = mEngineSettings.getInt("show owned", "Game");
|
||||
// Match the index with the option (only 0, 1, 2, or 3 are valid). Will default to 0 if invalid.
|
||||
if (showOwnedIndex >= 0 && showOwnedIndex <= 3)
|
||||
showOwnedComboBox->setCurrentIndex(showOwnedIndex);
|
||||
loadSettingBool(activeGridObjectPagingCheckBox, "object paging active grid", "Terrain");
|
||||
viewingDistanceComboBox->setValue(convertToCells(mEngineSettings.getInt("viewing distance", "Camera")));
|
||||
}
|
||||
|
||||
// Other Settings
|
||||
QString screenshotFormatString = QString::fromStdString(mEngineSettings.getString("screenshot format", "General")).toUpper();
|
||||
if (screenshotFormatComboBox->findText(screenshotFormatString) == -1)
|
||||
screenshotFormatComboBox->addItem(screenshotFormatString);
|
||||
screenshotFormatComboBox->setCurrentIndex(screenshotFormatComboBox->findText(screenshotFormatString));
|
||||
// Camera
|
||||
{
|
||||
loadSettingBool(viewOverShoulderCheckBox, "view over shoulder", "Camera");
|
||||
connect(viewOverShoulderCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotViewOverShoulderToggled(bool)));
|
||||
viewOverShoulderVerticalLayout->setEnabled(viewOverShoulderCheckBox->checkState());
|
||||
loadSettingBool(autoSwitchShoulderCheckBox, "auto switch shoulder", "Camera");
|
||||
loadSettingBool(previewIfStandStillCheckBox, "preview if stand still", "Camera");
|
||||
loadSettingBool(deferredPreviewRotationCheckBox, "deferred preview rotation", "Camera");
|
||||
loadSettingBool(headBobbingCheckBox, "head bobbing", "Camera");
|
||||
defaultShoulderComboBox->setCurrentIndex(
|
||||
mEngineSettings.getVector2("view over shoulder offset", "Camera").x() >= 0 ? 0 : 1);
|
||||
}
|
||||
|
||||
// Interface Changes
|
||||
{
|
||||
loadSettingBool(showEffectDurationCheckBox, "show effect duration", "Game");
|
||||
loadSettingBool(showEnchantChanceCheckBox, "show enchant chance", "Game");
|
||||
loadSettingBool(showMeleeInfoCheckBox, "show melee info", "Game");
|
||||
loadSettingBool(showProjectileDamageCheckBox, "show projectile damage", "Game");
|
||||
loadSettingBool(changeDialogTopicsCheckBox, "color topic enable", "GUI");
|
||||
int showOwnedIndex = mEngineSettings.getInt("show owned", "Game");
|
||||
// Match the index with the option (only 0, 1, 2, or 3 are valid). Will default to 0 if invalid.
|
||||
if (showOwnedIndex >= 0 && showOwnedIndex <= 3)
|
||||
showOwnedComboBox->setCurrentIndex(showOwnedIndex);
|
||||
}
|
||||
|
||||
// Bug fixes
|
||||
{
|
||||
loadSettingBool(preventMerchantEquippingCheckBox, "prevent merchant equipping", "Game");
|
||||
loadSettingBool(trainersTrainingSkillsBasedOnBaseSkillCheckBox, "trainers training skills based on base skill", "Game");
|
||||
}
|
||||
|
||||
// Miscellaneous
|
||||
{
|
||||
// Saves
|
||||
loadSettingBool(timePlayedCheckbox, "timeplayed", "Saves");
|
||||
maximumQuicksavesComboBox->setValue(mEngineSettings.getInt("max quicksaves", "Saves"));
|
||||
|
||||
// Other Settings
|
||||
QString screenshotFormatString = QString::fromStdString(mEngineSettings.getString("screenshot format", "General")).toUpper();
|
||||
if (screenshotFormatComboBox->findText(screenshotFormatString) == -1)
|
||||
screenshotFormatComboBox->addItem(screenshotFormatString);
|
||||
screenshotFormatComboBox->setCurrentIndex(screenshotFormatComboBox->findText(screenshotFormatString));
|
||||
}
|
||||
|
||||
// Testing
|
||||
{
|
||||
loadSettingBool(grabCursorCheckBox, "grab cursor", "Input");
|
||||
|
||||
bool skipMenu = mGameSettings.value("skip-menu").toInt() == 1;
|
||||
if (skipMenu)
|
||||
{
|
||||
skipMenuCheckBox->setCheckState(Qt::Checked);
|
||||
}
|
||||
startDefaultCharacterAtLabel->setEnabled(skipMenu);
|
||||
startDefaultCharacterAtField->setEnabled(skipMenu);
|
||||
|
||||
startDefaultCharacterAtField->setText(mGameSettings.value("start"));
|
||||
runScriptAfterStartupField->setText(mGameSettings.value("script-run"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Launcher::AdvancedPage::saveSettings()
|
||||
{
|
||||
// Ensure we only set the new settings if they changed. This is to avoid cluttering the
|
||||
// user settings file (which by definition should only contain settings the user has touched)
|
||||
// Game mechanics
|
||||
{
|
||||
saveSettingBool(toggleSneakCheckBox, "toggle sneak", "Input");
|
||||
saveSettingBool(canLootDuringDeathAnimationCheckBox, "can loot during death animation", "Game");
|
||||
saveSettingBool(followersAttackOnSightCheckBox, "followers attack on sight", "Game");
|
||||
saveSettingBool(rebalanceSoulGemValuesCheckBox, "rebalance soul gem values", "Game");
|
||||
saveSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
|
||||
saveSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
|
||||
saveSettingBool(classicReflectedAbsorbSpellsCheckBox, "classic reflected absorb spells behavior", "Game");
|
||||
saveSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game");
|
||||
saveSettingBool(uncappedDamageFatigueCheckBox, "uncapped damage fatigue", "Game");
|
||||
saveSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game");
|
||||
saveSettingBool(swimUpwardCorrectionCheckBox, "swim upward correction", "Game");
|
||||
saveSettingBool(avoidCollisionsCheckBox, "NPCs avoid collisions", "Game");
|
||||
int unarmedFactorsStrengthIndex = unarmedFactorsStrengthComboBox->currentIndex();
|
||||
if (unarmedFactorsStrengthIndex != mEngineSettings.getInt("strength influences hand to hand", "Game"))
|
||||
mEngineSettings.setInt("strength influences hand to hand", "Game", unarmedFactorsStrengthIndex);
|
||||
saveSettingBool(stealingFromKnockedOutCheckBox, "always allow stealing from knocked out actors", "Game");
|
||||
saveSettingBool(enableNavigatorCheckBox, "enable", "Navigator");
|
||||
int numPhysicsThreads = physicsThreadsSpinBox->value();
|
||||
if (numPhysicsThreads != mEngineSettings.getInt("async num threads", "Physics"))
|
||||
mEngineSettings.setInt("async num threads", "Physics", numPhysicsThreads);
|
||||
}
|
||||
|
||||
// Visuals
|
||||
{
|
||||
saveSettingBool(autoUseObjectNormalMapsCheckBox, "auto use object normal maps", "Shaders");
|
||||
saveSettingBool(autoUseObjectSpecularMapsCheckBox, "auto use object specular maps", "Shaders");
|
||||
saveSettingBool(autoUseTerrainNormalMapsCheckBox, "auto use terrain normal maps", "Shaders");
|
||||
saveSettingBool(autoUseTerrainSpecularMapsCheckBox, "auto use terrain specular maps", "Shaders");
|
||||
saveSettingBool(bumpMapLocalLightingCheckBox, "apply lighting to environment maps", "Shaders");
|
||||
saveSettingBool(radialFogCheckBox, "radial fog", "Shaders");
|
||||
saveSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game");
|
||||
saveSettingBool(animSourcesCheckBox, "use additional anim sources", "Game");
|
||||
saveSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game");
|
||||
saveSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game");
|
||||
saveSettingBool(turnToMovementDirectionCheckBox, "turn to movement direction", "Game");
|
||||
saveSettingBool(smoothMovementCheckBox, "smooth movement", "Game");
|
||||
|
||||
const bool distantTerrain = mEngineSettings.getBool("distant terrain", "Terrain");
|
||||
const bool objectPaging = mEngineSettings.getBool("object paging", "Terrain");
|
||||
const bool wantDistantLand = distantLandCheckBox->checkState();
|
||||
if (wantDistantLand != (distantTerrain && objectPaging)) {
|
||||
mEngineSettings.setBool("distant terrain", "Terrain", wantDistantLand);
|
||||
mEngineSettings.setBool("object paging", "Terrain", wantDistantLand);
|
||||
}
|
||||
|
||||
saveSettingBool(activeGridObjectPagingCheckBox, "object paging active grid", "Terrain");
|
||||
double viewingDistance = viewingDistanceComboBox->value();
|
||||
if (viewingDistance != convertToCells(mEngineSettings.getInt("viewing distance", "Camera")))
|
||||
{
|
||||
mEngineSettings.setInt("viewing distance", "Camera", convertToUnits(viewingDistance));
|
||||
}
|
||||
}
|
||||
|
||||
// Camera
|
||||
{
|
||||
saveSettingBool(viewOverShoulderCheckBox, "view over shoulder", "Camera");
|
||||
saveSettingBool(autoSwitchShoulderCheckBox, "auto switch shoulder", "Camera");
|
||||
saveSettingBool(previewIfStandStillCheckBox, "preview if stand still", "Camera");
|
||||
saveSettingBool(deferredPreviewRotationCheckBox, "deferred preview rotation", "Camera");
|
||||
saveSettingBool(headBobbingCheckBox, "head bobbing", "Camera");
|
||||
|
||||
osg::Vec2f shoulderOffset = mEngineSettings.getVector2("view over shoulder offset", "Camera");
|
||||
if (defaultShoulderComboBox->currentIndex() != (shoulderOffset.x() >= 0 ? 0 : 1))
|
||||
{
|
||||
if (defaultShoulderComboBox->currentIndex() == 0)
|
||||
shoulderOffset.x() = std::abs(shoulderOffset.x());
|
||||
else
|
||||
shoulderOffset.x() = -std::abs(shoulderOffset.x());
|
||||
mEngineSettings.setVector2("view over shoulder offset", "Camera", shoulderOffset);
|
||||
}
|
||||
}
|
||||
|
||||
// Interface Changes
|
||||
{
|
||||
saveSettingBool(showEffectDurationCheckBox, "show effect duration", "Game");
|
||||
saveSettingBool(showEnchantChanceCheckBox, "show enchant chance", "Game");
|
||||
saveSettingBool(showMeleeInfoCheckBox, "show melee info", "Game");
|
||||
saveSettingBool(showProjectileDamageCheckBox, "show projectile damage", "Game");
|
||||
saveSettingBool(changeDialogTopicsCheckBox, "color topic enable", "GUI");
|
||||
int showOwnedCurrentIndex = showOwnedComboBox->currentIndex();
|
||||
if (showOwnedCurrentIndex != mEngineSettings.getInt("show owned", "Game"))
|
||||
mEngineSettings.setInt("show owned", "Game", showOwnedCurrentIndex);
|
||||
}
|
||||
|
||||
// Bug fixes
|
||||
{
|
||||
saveSettingBool(preventMerchantEquippingCheckBox, "prevent merchant equipping", "Game");
|
||||
saveSettingBool(trainersTrainingSkillsBasedOnBaseSkillCheckBox, "trainers training skills based on base skill", "Game");
|
||||
}
|
||||
|
||||
// Miscellaneous
|
||||
{
|
||||
// Saves Settings
|
||||
saveSettingBool(timePlayedCheckbox, "timeplayed", "Saves");
|
||||
int maximumQuicksaves = maximumQuicksavesComboBox->value();
|
||||
if (maximumQuicksaves != mEngineSettings.getInt("max quicksaves", "Saves"))
|
||||
{
|
||||
mEngineSettings.setInt("max quicksaves", "Saves", maximumQuicksaves);
|
||||
}
|
||||
|
||||
// Other Settings
|
||||
std::string screenshotFormatString = screenshotFormatComboBox->currentText().toLower().toStdString();
|
||||
if (screenshotFormatString != mEngineSettings.getString("screenshot format", "General"))
|
||||
mEngineSettings.setString("screenshot format", "General", screenshotFormatString);
|
||||
}
|
||||
|
||||
// Testing
|
||||
int skipMenu = skipMenuCheckBox->checkState() == Qt::Checked;
|
||||
if (skipMenu != mGameSettings.value("skip-menu").toInt())
|
||||
mGameSettings.setValue("skip-menu", QString::number(skipMenu));
|
||||
{
|
||||
saveSettingBool(grabCursorCheckBox, "grab cursor", "Input");
|
||||
|
||||
QString startCell = startDefaultCharacterAtField->text();
|
||||
if (startCell != mGameSettings.value("start")) {
|
||||
mGameSettings.setValue("start", startCell);
|
||||
int skipMenu = skipMenuCheckBox->checkState() == Qt::Checked;
|
||||
if (skipMenu != mGameSettings.value("skip-menu").toInt())
|
||||
mGameSettings.setValue("skip-menu", QString::number(skipMenu));
|
||||
|
||||
QString startCell = startDefaultCharacterAtField->text();
|
||||
if (startCell != mGameSettings.value("start"))
|
||||
{
|
||||
mGameSettings.setValue("start", startCell);
|
||||
}
|
||||
QString scriptRun = runScriptAfterStartupField->text();
|
||||
if (scriptRun != mGameSettings.value("script-run"))
|
||||
mGameSettings.setValue("script-run", scriptRun);
|
||||
}
|
||||
QString scriptRun = runScriptAfterStartupField->text();
|
||||
if (scriptRun != mGameSettings.value("script-run"))
|
||||
mGameSettings.setValue("script-run", scriptRun);
|
||||
|
||||
// Game Settings
|
||||
saveSettingBool(canLootDuringDeathAnimationCheckBox, "can loot during death animation", "Game");
|
||||
saveSettingBool(followersAttackOnSightCheckBox, "followers attack on sight", "Game");
|
||||
saveSettingBool(preventMerchantEquippingCheckBox, "prevent merchant equipping", "Game");
|
||||
saveSettingBool(rebalanceSoulGemValuesCheckBox, "rebalance soul gem values", "Game");
|
||||
saveSettingBool(classicReflectedAbsorbSpellsCheckBox, "classic reflected absorb spells behavior", "Game");
|
||||
saveSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
|
||||
saveSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
|
||||
int unarmedFactorsStrengthIndex = unarmedFactorsStrengthComboBox->currentIndex();
|
||||
if (unarmedFactorsStrengthIndex != mEngineSettings.getInt("strength influences hand to hand", "Game"))
|
||||
mEngineSettings.setInt("strength influences hand to hand", "Game", unarmedFactorsStrengthIndex);
|
||||
saveSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game");
|
||||
saveSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game");
|
||||
saveSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game");
|
||||
saveSettingBool(animSourcesCheckBox, "use additional anim sources", "Game");
|
||||
saveSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game");
|
||||
saveSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game");
|
||||
saveSettingBool(uncappedDamageFatigueCheckBox, "uncapped damage fatigue", "Game");
|
||||
saveSettingBool(trainersTrainingSkillsBasedOnBaseSkillCheckBox, "trainers training skills based on base skill", "Game");
|
||||
|
||||
// Input Settings
|
||||
saveSettingBool(grabCursorCheckBox, "grab cursor", "Input");
|
||||
saveSettingBool(toggleSneakCheckBox, "toggle sneak", "Input");
|
||||
|
||||
// Saves Settings
|
||||
saveSettingBool(timePlayedCheckbox, "timeplayed", "Saves");
|
||||
int maximumQuicksaves = maximumQuicksavesComboBox->value();
|
||||
if (maximumQuicksaves != mEngineSettings.getInt("max quicksaves", "Saves")) {
|
||||
mEngineSettings.setInt("max quicksaves", "Saves", maximumQuicksaves);
|
||||
}
|
||||
|
||||
// User Interface Settings
|
||||
saveSettingBool(showEffectDurationCheckBox, "show effect duration", "Game");
|
||||
saveSettingBool(showEnchantChanceCheckBox, "show enchant chance", "Game");
|
||||
saveSettingBool(showMeleeInfoCheckBox, "show melee info", "Game");
|
||||
saveSettingBool(showProjectileDamageCheckBox, "show projectile damage", "Game");
|
||||
saveSettingBool(changeDialogTopicsCheckBox, "color topic enable", "GUI");
|
||||
int showOwnedCurrentIndex = showOwnedComboBox->currentIndex();
|
||||
if (showOwnedCurrentIndex != mEngineSettings.getInt("show owned", "Game"))
|
||||
mEngineSettings.setInt("show owned", "Game", showOwnedCurrentIndex);
|
||||
|
||||
// Other Settings
|
||||
std::string screenshotFormatString = screenshotFormatComboBox->currentText().toLower().toStdString();
|
||||
if (screenshotFormatString != mEngineSettings.getString("screenshot format", "General"))
|
||||
mEngineSettings.setString("screenshot format", "General", screenshotFormatString);
|
||||
}
|
||||
|
||||
void Launcher::AdvancedPage::loadSettingBool(QCheckBox *checkbox, const std::string &setting, const std::string &group) {
|
||||
void Launcher::AdvancedPage::loadSettingBool(QCheckBox *checkbox, const std::string &setting, const std::string &group)
|
||||
{
|
||||
if (mEngineSettings.getBool(setting, group))
|
||||
checkbox->setCheckState(Qt::Checked);
|
||||
}
|
||||
|
||||
void Launcher::AdvancedPage::saveSettingBool(QCheckBox *checkbox, const std::string &setting, const std::string &group) {
|
||||
void Launcher::AdvancedPage::saveSettingBool(QCheckBox *checkbox, const std::string &setting, const std::string &group)
|
||||
{
|
||||
bool cValue = checkbox->checkState();
|
||||
if (cValue != mEngineSettings.getBool(setting, group))
|
||||
mEngineSettings.setBool(setting, group, cValue);
|
||||
|
@ -211,3 +348,8 @@ void Launcher::AdvancedPage::slotAnimSourcesToggled(bool checked)
|
|||
shieldSheathingCheckBox->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
}
|
||||
|
||||
void Launcher::AdvancedPage::slotViewOverShoulderToggled(bool checked)
|
||||
{
|
||||
viewOverShoulderVerticalLayout->setEnabled(viewOverShoulderCheckBox->checkState());
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define ADVANCEDPAGE_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QCompleter>
|
||||
#include <QStringListModel>
|
||||
|
||||
#include "ui_advancedpage.h"
|
||||
|
||||
|
@ -30,11 +32,14 @@ namespace Launcher
|
|||
void on_skipMenuCheckBox_stateChanged(int state);
|
||||
void on_runScriptAfterStartupBrowseButton_clicked();
|
||||
void slotAnimSourcesToggled(bool checked);
|
||||
void slotViewOverShoulderToggled(bool checked);
|
||||
|
||||
private:
|
||||
Files::ConfigurationManager &mCfgMgr;
|
||||
Config::GameSettings &mGameSettings;
|
||||
Settings::Manager &mEngineSettings;
|
||||
QCompleter mCellNameCompleter;
|
||||
QStringListModel mCellNameCompleterModel;
|
||||
|
||||
/**
|
||||
* Load the cells associated with the given content files for use in autocomplete
|
||||
|
|
|
@ -13,12 +13,13 @@
|
|||
|
||||
#include <SDL_video.h>
|
||||
|
||||
#include <numeric>
|
||||
|
||||
#include <components/files/configurationmanager.hpp>
|
||||
#include <components/misc/gcd.hpp>
|
||||
|
||||
QString getAspect(int x, int y)
|
||||
{
|
||||
int gcd = Misc::gcd (x, y);
|
||||
int gcd = std::gcd (x, y);
|
||||
int xaspect = x / gcd;
|
||||
int yaspect = y / gcd;
|
||||
// special case: 8 : 5 is usually referred to as 16:10
|
||||
|
@ -65,16 +66,19 @@ bool Launcher::GraphicsPage::setupSDL()
|
|||
msgBox.setWindowTitle(tr("Error receiving number of screens"));
|
||||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||
msgBox.setText(tr("<br><b>SDL_GetNumDisplayModes failed:</b><br><br>") + QString::fromUtf8(SDL_GetError()) + "<br>");
|
||||
msgBox.setText(tr("<br><b>SDL_GetNumVideoDisplays failed:</b><br><br>") + QString::fromUtf8(SDL_GetError()) + "<br>");
|
||||
msgBox.exec();
|
||||
return false;
|
||||
}
|
||||
|
||||
screenComboBox->clear();
|
||||
mResolutionsPerScreen.clear();
|
||||
for (int i = 0; i < displays; i++)
|
||||
{
|
||||
mResolutionsPerScreen.append(getAvailableResolutions(i));
|
||||
screenComboBox->addItem(QString(tr("Screen ")) + QString::number(i + 1));
|
||||
}
|
||||
screenChanged(0);
|
||||
|
||||
// Disconnect from SDL processes
|
||||
quitSDL();
|
||||
|
@ -331,7 +335,7 @@ void Launcher::GraphicsPage::screenChanged(int screen)
|
|||
{
|
||||
if (screen >= 0) {
|
||||
resolutionComboBox->clear();
|
||||
resolutionComboBox->addItems(getAvailableResolutions(screen));
|
||||
resolutionComboBox->addItems(mResolutionsPerScreen[screen]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ namespace Launcher
|
|||
Files::ConfigurationManager &mCfgMgr;
|
||||
Settings::Manager &mEngineSettings;
|
||||
|
||||
QVector<QStringList> mResolutionsPerScreen;
|
||||
|
||||
static QStringList getAvailableResolutions(int screen);
|
||||
static QRect getMaximumResolution();
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace Launcher
|
|||
inline bool startProgram(const QString &name, bool detached = false) { return startProgram(name, QStringList(), detached); }
|
||||
bool startProgram(const QString &name, const QStringList &arguments, bool detached = false);
|
||||
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
PlayPage *mPlayPage;
|
||||
GraphicsPage *mGraphicsPage;
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
LineEdit(QWidget *parent = 0);
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
void resizeEvent(QResizeEvent *) override;
|
||||
|
||||
private slots:
|
||||
void updateClearButton(const QString &text);
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace Launcher
|
|||
inline LineEdit *lineEdit() { return mLineEdit; }
|
||||
void setOkButtonEnabled(bool enabled);
|
||||
|
||||
int exec();
|
||||
int exec() override;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -233,8 +233,15 @@ target_link_libraries(openmw-cs Qt5::Widgets Qt5::Core Qt5::Network Qt5::OpenGL)
|
|||
if (WIN32)
|
||||
target_link_libraries(openmw-cs ${Boost_LOCALE_LIBRARY})
|
||||
INSTALL(TARGETS openmw-cs RUNTIME DESTINATION ".")
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Debug/openmw-cs.cfg" DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Release/openmw-cs.cfg" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
|
||||
get_generator_is_multi_config(multi_config)
|
||||
if (multi_config)
|
||||
SET(INSTALL_SOURCE "${OpenMW_BINARY_DIR}/$<CONFIG>")
|
||||
else ()
|
||||
SET(INSTALL_SOURCE "${OpenMW_BINARY_DIR}")
|
||||
endif ()
|
||||
|
||||
INSTALL(FILES "${INSTALL_SOURCE}/openmw-cs.cfg" DESTINATION ".")
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
|
|
|
@ -22,7 +22,7 @@ class Application : public QApplication
|
|||
{
|
||||
private:
|
||||
|
||||
bool notify (QObject *receiver, QEvent *event)
|
||||
bool notify (QObject *receiver, QEvent *event) override
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
@ -37,10 +37,10 @@ namespace CSMDoc
|
|||
OpenSaveStage (Document& document, SavingState& state, bool projectFile);
|
||||
///< \param projectFile Saving the project file instead of the content file.
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, Messages& messages);
|
||||
void perform (int stage, Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -55,10 +55,10 @@ namespace CSMDoc
|
|||
WriteHeaderStage (Document& document, SavingState& state, bool simple);
|
||||
///< \param simple Simplified header (used for project files).
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, Messages& messages);
|
||||
void perform (int stage, Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -75,10 +75,10 @@ namespace CSMDoc
|
|||
WriteCollectionStage (const CollectionT& collection, SavingState& state,
|
||||
CSMWorld::Scope scope = CSMWorld::Scope_Content);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, Messages& messages);
|
||||
void perform (int stage, Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -125,10 +125,10 @@ namespace CSMDoc
|
|||
|
||||
WriteDialogueCollectionStage (Document& document, SavingState& state, bool journal);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, Messages& messages);
|
||||
void perform (int stage, Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -142,10 +142,10 @@ namespace CSMDoc
|
|||
|
||||
WriteRefIdCollectionStage (Document& document, SavingState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, Messages& messages);
|
||||
void perform (int stage, Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -159,10 +159,10 @@ namespace CSMDoc
|
|||
|
||||
CollectionReferencesStage (Document& document, SavingState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, Messages& messages);
|
||||
void perform (int stage, Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -175,10 +175,10 @@ namespace CSMDoc
|
|||
|
||||
WriteCellCollectionStage (Document& document, SavingState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, Messages& messages);
|
||||
void perform (int stage, Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -192,10 +192,10 @@ namespace CSMDoc
|
|||
|
||||
WritePathgridCollectionStage (Document& document, SavingState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, Messages& messages);
|
||||
void perform (int stage, Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -209,10 +209,10 @@ namespace CSMDoc
|
|||
|
||||
WriteLandCollectionStage (Document& document, SavingState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, Messages& messages);
|
||||
void perform (int stage, Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -226,10 +226,10 @@ namespace CSMDoc
|
|||
|
||||
WriteLandTextureCollectionStage (Document& document, SavingState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, Messages& messages);
|
||||
void perform (int stage, Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -241,10 +241,10 @@ namespace CSMDoc
|
|||
|
||||
CloseSaveStage (SavingState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, Messages& messages);
|
||||
void perform (int stage, Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -257,10 +257,10 @@ namespace CSMDoc
|
|||
|
||||
FinalSavingStage (Document& document, SavingState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, Messages& messages);
|
||||
void perform (int stage, Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@ namespace CSMFilter
|
|||
|
||||
AndNode (const std::vector<std::shared_ptr<Node> >& nodes);
|
||||
|
||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
||||
const std::map<int, int>& columns) const;
|
||||
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||
const std::map<int, int>& columns) const override;
|
||||
///< \return Can the specified table row pass through to filter?
|
||||
/// \param columns column ID to column index mapping
|
||||
};
|
||||
|
|
|
@ -13,12 +13,12 @@ namespace CSMFilter
|
|||
|
||||
BooleanNode (bool true_);
|
||||
|
||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
||||
const std::map<int, int>& columns) const;
|
||||
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||
const std::map<int, int>& columns) const override;
|
||||
///< \return Can the specified table row pass through to filter?
|
||||
/// \param columns column ID to column index mapping
|
||||
|
||||
virtual std::string toString (bool numericColumns) const;
|
||||
std::string toString (bool numericColumns) const override;
|
||||
///< Return a string that represents this node.
|
||||
///
|
||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace CSMFilter
|
|||
{
|
||||
public:
|
||||
|
||||
virtual std::vector<int> getReferencedColumns() const;
|
||||
std::vector<int> getReferencedColumns() const override;
|
||||
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
||||
/// passed into test as columns must contain all columns listed here.
|
||||
};
|
||||
|
|
|
@ -21,11 +21,11 @@ namespace CSMFilter
|
|||
|
||||
const Node& operator[] (int index) const;
|
||||
|
||||
virtual std::vector<int> getReferencedColumns() const;
|
||||
std::vector<int> getReferencedColumns() const override;
|
||||
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
||||
/// passed into test as columns must contain all columns listed here.
|
||||
|
||||
virtual std::string toString (bool numericColumns) const;
|
||||
std::string toString (bool numericColumns) const override;
|
||||
///< Return a string that represents this node.
|
||||
///
|
||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||
|
|
|
@ -11,8 +11,8 @@ namespace CSMFilter
|
|||
|
||||
NotNode (std::shared_ptr<Node> child);
|
||||
|
||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
||||
const std::map<int, int>& columns) const;
|
||||
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||
const std::map<int, int>& columns) const override;
|
||||
///< \return Can the specified table row pass through to filter?
|
||||
/// \param columns column ID to column index mapping
|
||||
};
|
||||
|
|
|
@ -11,8 +11,8 @@ namespace CSMFilter
|
|||
|
||||
OrNode (const std::vector<std::shared_ptr<Node> >& nodes);
|
||||
|
||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
||||
const std::map<int, int>& columns) const;
|
||||
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||
const std::map<int, int>& columns) const override;
|
||||
///< \return Can the specified table row pass through to filter?
|
||||
/// \param columns column ID to column index mapping
|
||||
};
|
||||
|
|
|
@ -14,16 +14,16 @@ namespace CSMFilter
|
|||
|
||||
TextNode (int columnId, const std::string& text);
|
||||
|
||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
||||
const std::map<int, int>& columns) const;
|
||||
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||
const std::map<int, int>& columns) const override;
|
||||
///< \return Can the specified table row pass through to filter?
|
||||
/// \param columns column ID to column index mapping
|
||||
|
||||
virtual std::vector<int> getReferencedColumns() const;
|
||||
std::vector<int> getReferencedColumns() const override;
|
||||
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
||||
/// passed into test as columns must contain all columns listed here.
|
||||
|
||||
virtual std::string toString (bool numericColumns) const;
|
||||
std::string toString (bool numericColumns) const override;
|
||||
///< Return a string that represents this node.
|
||||
///
|
||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||
|
|
|
@ -18,11 +18,11 @@ namespace CSMFilter
|
|||
|
||||
Node& getChild();
|
||||
|
||||
virtual std::vector<int> getReferencedColumns() const;
|
||||
std::vector<int> getReferencedColumns() const override;
|
||||
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
||||
/// passed into test as columns must contain all columns listed here.
|
||||
|
||||
virtual std::string toString (bool numericColumns) const;
|
||||
std::string toString (bool numericColumns) const override;
|
||||
///< Return a string that represents this node.
|
||||
///
|
||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||
|
|
|
@ -27,16 +27,16 @@ namespace CSMFilter
|
|||
|
||||
ValueNode (int columnId, Type lowerType, Type upperType, double lower, double upper);
|
||||
|
||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
||||
const std::map<int, int>& columns) const;
|
||||
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||
const std::map<int, int>& columns) const override;
|
||||
///< \return Can the specified table row pass through to filter?
|
||||
/// \param columns column ID to column index mapping
|
||||
|
||||
virtual std::vector<int> getReferencedColumns() const;
|
||||
std::vector<int> getReferencedColumns() const override;
|
||||
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
||||
/// passed into test as columns must contain all columns listed here.
|
||||
|
||||
virtual std::string toString (bool numericColumns) const;
|
||||
std::string toString (bool numericColumns) const override;
|
||||
///< Return a string that represents this node.
|
||||
///
|
||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||
|
|
|
@ -23,9 +23,9 @@ namespace CSMPrefs
|
|||
BoolSetting& setTooltip (const std::string& tooltip);
|
||||
|
||||
/// Return label, input widget.
|
||||
virtual std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent);
|
||||
std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent) override;
|
||||
|
||||
virtual void updateWidget();
|
||||
void updateWidget() override;
|
||||
|
||||
private slots:
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ namespace CSMPrefs
|
|||
ColourSetting& setTooltip (const std::string& tooltip);
|
||||
|
||||
/// Return label, input widget.
|
||||
virtual std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent);
|
||||
std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent) override;
|
||||
|
||||
virtual void updateWidget();
|
||||
void updateWidget() override;
|
||||
|
||||
private slots:
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ namespace CSMPrefs
|
|||
DoubleSetting& setTooltip (const std::string& tooltip);
|
||||
|
||||
/// Return label, input widget.
|
||||
virtual std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent);
|
||||
std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent) override;
|
||||
|
||||
virtual void updateWidget();
|
||||
void updateWidget() override;
|
||||
|
||||
private slots:
|
||||
|
||||
|
|
|
@ -54,9 +54,9 @@ namespace CSMPrefs
|
|||
EnumSetting& addValue (const std::string& value, const std::string& tooltip);
|
||||
|
||||
/// Return label, input widget.
|
||||
virtual std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent);
|
||||
std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent) override;
|
||||
|
||||
virtual void updateWidget();
|
||||
void updateWidget() override;
|
||||
|
||||
private slots:
|
||||
|
||||
|
|
|
@ -32,9 +32,9 @@ namespace CSMPrefs
|
|||
IntSetting& setTooltip (const std::string& tooltip);
|
||||
|
||||
/// Return label, input widget.
|
||||
virtual std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent);
|
||||
std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent) override;
|
||||
|
||||
virtual void updateWidget();
|
||||
void updateWidget() override;
|
||||
|
||||
private slots:
|
||||
|
||||
|
|
|
@ -19,13 +19,13 @@ namespace CSMPrefs
|
|||
ModifierSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
||||
const std::string& label);
|
||||
|
||||
virtual std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent);
|
||||
std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent) override;
|
||||
|
||||
virtual void updateWidget();
|
||||
void updateWidget() override;
|
||||
|
||||
protected:
|
||||
|
||||
bool eventFilter(QObject* target, QEvent* event);
|
||||
bool eventFilter(QObject* target, QEvent* event) override;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace CSMPrefs
|
|||
|
||||
protected:
|
||||
|
||||
bool eventFilter(QObject* watched, QEvent* event);
|
||||
bool eventFilter(QObject* watched, QEvent* event) override;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -19,13 +19,13 @@ namespace CSMPrefs
|
|||
ShortcutSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
||||
const std::string& label);
|
||||
|
||||
virtual std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent);
|
||||
std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent) override;
|
||||
|
||||
virtual void updateWidget();
|
||||
void updateWidget() override;
|
||||
|
||||
protected:
|
||||
|
||||
bool eventFilter(QObject* target, QEvent* event);
|
||||
bool eventFilter(QObject* target, QEvent* event) override;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@ namespace CSMTools
|
|||
BirthsignCheckStage (const CSMWorld::IdCollection<ESM::BirthSign> &birthsigns,
|
||||
const CSMWorld::Resources &textures);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -25,10 +25,10 @@ namespace CSMTools
|
|||
const CSMWorld::Resources &meshes,
|
||||
const CSMWorld::IdCollection<ESM::Race> &races );
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform( int stage, CSMDoc::Messages &messages );
|
||||
void perform(int stage, CSMDoc::Messages &messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
|||
|
||||
ClassCheckStage (const CSMWorld::IdCollection<ESM::Class>& classes);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
|||
|
||||
EnchantmentCheckStage (const CSMWorld::IdCollection<ESM::Enchantment>& enchantments);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
|
||||
};
|
||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
|||
|
||||
FactionCheckStage (const CSMWorld::IdCollection<ESM::Faction>& factions);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@ namespace CSMTools
|
|||
|
||||
GmstCheckStage(const CSMWorld::IdCollection<ESM::GameSetting>& gameSettings);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
||||
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages
|
||||
|
||||
private:
|
||||
|
|
|
@ -18,10 +18,10 @@ namespace CSMTools
|
|||
JournalCheckStage(const CSMWorld::IdCollection<ESM::Dialogue>& journals,
|
||||
const CSMWorld::InfoCollection& journalInfos);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
||||
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages
|
||||
|
||||
private:
|
||||
|
|
|
@ -32,9 +32,9 @@ namespace CSMTools
|
|||
const CSMWorld::Resources &icons,
|
||||
const CSMWorld::Resources &textures);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
virtual void perform (int stage, CSMDoc::Messages &messages);
|
||||
void perform (int stage, CSMDoc::Messages &messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -27,10 +27,10 @@ namespace CSMTools
|
|||
MandatoryIdStage (const CSMWorld::CollectionBase& idCollection, const CSMWorld::UniversalId& collectionId,
|
||||
const std::vector<std::string>& ids);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace CSMTools
|
|||
|
||||
protected slots:
|
||||
|
||||
virtual void operationDone();
|
||||
void operationDone() override;
|
||||
|
||||
signals:
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@ namespace CSMTools
|
|||
|
||||
StartMergeStage (MergeState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -38,10 +38,10 @@ namespace CSMTools
|
|||
|
||||
FinishMergedDocumentStage (MergeState& state, ToUTF8::FromType encoding);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -55,10 +55,10 @@ namespace CSMTools
|
|||
|
||||
MergeIdCollectionStage (MergeState& state, Collection& (CSMWorld::Data::*accessor)());
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -93,10 +93,10 @@ namespace CSMTools
|
|||
|
||||
MergeRefIdsStage (MergeState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -109,10 +109,10 @@ namespace CSMTools
|
|||
|
||||
MergeReferencesStage (MergeState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -125,10 +125,10 @@ namespace CSMTools
|
|||
|
||||
PopulateLandTexturesMergeStage (MergeState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -140,10 +140,10 @@ namespace CSMTools
|
|||
|
||||
MergeLandStage (MergeState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -157,10 +157,10 @@ namespace CSMTools
|
|||
|
||||
FixLandsAndLandTexturesMergeStage (MergeState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
|
||||
|
@ -174,10 +174,10 @@ namespace CSMTools
|
|||
|
||||
CleanupLandTexturesMergeStage (MergeState& state);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -32,9 +32,9 @@ namespace CSMTools
|
|||
PathgridCheckStage (const CSMWorld::SubCellCollection<CSMWorld::Pathgrid,
|
||||
CSMWorld::IdAccessor<CSMWorld::Pathgrid> >& pathgrids);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -24,10 +24,10 @@ namespace CSMTools
|
|||
|
||||
RaceCheckStage (const CSMWorld::IdCollection<ESM::Race>& races);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ namespace CSMTools
|
|||
const CSMWorld::Resources& icons,
|
||||
const CSMWorld::IdCollection<ESM::BodyPart>& bodyparts);
|
||||
|
||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
||||
virtual int setup();
|
||||
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||
int setup() override;
|
||||
|
||||
private:
|
||||
//CONCRETE CHECKS
|
||||
|
|
|
@ -14,8 +14,8 @@ namespace CSMTools
|
|||
const CSMWorld::IdCollection<CSMWorld::Cell>& cells,
|
||||
const CSMWorld::IdCollection<ESM::Faction>& factions);
|
||||
|
||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
||||
virtual int setup();
|
||||
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||
int setup() override;
|
||||
|
||||
private:
|
||||
const CSMWorld::RefCollection& mReferences;
|
||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
|||
|
||||
RegionCheckStage (const CSMWorld::IdCollection<ESM::Region>& regions);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -33,15 +33,15 @@ namespace CSMTools
|
|||
|
||||
ReportModel (bool fieldColumn = false, bool severityColumn = true);
|
||||
|
||||
virtual int rowCount (const QModelIndex & parent = QModelIndex()) const;
|
||||
int rowCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||
|
||||
virtual int columnCount (const QModelIndex & parent = QModelIndex()) const;
|
||||
int columnCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||
|
||||
virtual QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const;
|
||||
QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
virtual QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
||||
virtual bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex());
|
||||
bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex()) override;
|
||||
|
||||
void add (const CSMDoc::Message& message);
|
||||
|
||||
|
|
|
@ -36,20 +36,20 @@ namespace CSMTools
|
|||
|
||||
CSMDoc::Message::Severity getSeverity (Type type);
|
||||
|
||||
virtual void report (const std::string& message, const Compiler::TokenLoc& loc, Type type);
|
||||
void report (const std::string& message, const Compiler::TokenLoc& loc, Type type) override;
|
||||
///< Report error to the user.
|
||||
|
||||
virtual void report (const std::string& message, Type type);
|
||||
void report (const std::string& message, Type type) override;
|
||||
///< Report a file related error
|
||||
|
||||
public:
|
||||
|
||||
ScriptCheckStage (const CSMDoc::Document& document);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -24,10 +24,10 @@ namespace CSMTools
|
|||
|
||||
SearchStage (const CSMWorld::IdTableBase *model);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
|
||||
void setOperation (const SearchOperation *operation);
|
||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
|||
|
||||
SkillCheckStage (const CSMWorld::IdCollection<ESM::Skill>& skills);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -22,10 +22,10 @@ namespace CSMTools
|
|||
SoundCheckStage (const CSMWorld::IdCollection<ESM::Sound>& sounds,
|
||||
const CSMWorld::Resources &soundfiles);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -20,10 +20,10 @@ namespace CSMTools
|
|||
const CSMWorld::IdCollection<ESM::Sound> &sounds,
|
||||
const CSMWorld::RefIdCollection &objects);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform(int stage, CSMDoc::Messages &messages);
|
||||
void perform(int stage, CSMDoc::Messages &messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
|||
|
||||
SpellCheckStage (const CSMWorld::IdCollection<ESM::Spell>& spells);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
||||
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this tage will be appended to \a messages.
|
||||
};
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ namespace CSMTools
|
|||
StartScriptCheckStage (const CSMWorld::IdCollection<ESM::StartScript>& startScripts,
|
||||
const CSMWorld::IdCollection<ESM::Script>& scripts);
|
||||
|
||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
||||
virtual int setup();
|
||||
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||
int setup() override;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -40,10 +40,10 @@ namespace CSMTools
|
|||
const CSMWorld::RefIdData& referencables,
|
||||
const CSMWorld::Resources& soundFiles);
|
||||
|
||||
virtual int setup();
|
||||
int setup() override;
|
||||
///< \return number of steps
|
||||
|
||||
virtual void perform(int step, CSMDoc::Messages& messages);
|
||||
void perform(int step, CSMDoc::Messages& messages) override;
|
||||
///< Messages resulting from this stage will be appended to \a messages
|
||||
|
||||
private:
|
||||
|
|
|
@ -120,19 +120,19 @@ namespace CSMWorld
|
|||
void add (const ESXRecordT& record);
|
||||
///< Add a new record (modified)
|
||||
|
||||
virtual int getSize() const;
|
||||
int getSize() const override;
|
||||
|
||||
virtual std::string getId (int index) const;
|
||||
std::string getId (int index) const override;
|
||||
|
||||
virtual int getIndex (const std::string& id) const;
|
||||
int getIndex (const std::string& id) const override;
|
||||
|
||||
virtual int getColumns() const;
|
||||
int getColumns() const override;
|
||||
|
||||
virtual QVariant getData (int index, int column) const;
|
||||
QVariant getData (int index, int column) const override;
|
||||
|
||||
virtual void setData (int index, int column, const QVariant& data);
|
||||
void setData (int index, int column, const QVariant& data) override;
|
||||
|
||||
virtual const ColumnBase& getColumn (int column) const;
|
||||
const ColumnBase& getColumn (int column) const override;
|
||||
|
||||
virtual void merge();
|
||||
///< Merge modified into base.
|
||||
|
@ -140,43 +140,43 @@ namespace CSMWorld
|
|||
virtual void purge();
|
||||
///< Remove records that are flagged as erased.
|
||||
|
||||
virtual void removeRows (int index, int count) ;
|
||||
void removeRows (int index, int count) override;
|
||||
|
||||
virtual void appendBlankRecord (const std::string& id,
|
||||
UniversalId::Type type = UniversalId::Type_None);
|
||||
void appendBlankRecord (const std::string& id,
|
||||
UniversalId::Type type = UniversalId::Type_None) override;
|
||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||
|
||||
virtual void cloneRecord(const std::string& origin,
|
||||
void cloneRecord(const std::string& origin,
|
||||
const std::string& destination,
|
||||
const UniversalId::Type type);
|
||||
const UniversalId::Type type) override;
|
||||
|
||||
virtual bool touchRecord(const std::string& id);
|
||||
bool touchRecord(const std::string& id) override;
|
||||
///< Change the state of a record from base to modified, if it is not already.
|
||||
/// \return True if the record was changed.
|
||||
|
||||
virtual int searchId (const std::string& id) const;
|
||||
int searchId (const std::string& id) const override;
|
||||
////< Search record with \a id.
|
||||
/// \return index of record (if found) or -1 (not found)
|
||||
|
||||
virtual void replace (int index, const RecordBase& record);
|
||||
void replace (int index, const RecordBase& record) override;
|
||||
///< If the record type does not match, an exception is thrown.
|
||||
///
|
||||
/// \attention \a record must not change the ID.
|
||||
|
||||
virtual void appendRecord (const RecordBase& record,
|
||||
UniversalId::Type type = UniversalId::Type_None);
|
||||
void appendRecord (const RecordBase& record,
|
||||
UniversalId::Type type = UniversalId::Type_None) override;
|
||||
///< If the record type does not match, an exception is thrown.
|
||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||
|
||||
virtual const Record<ESXRecordT>& getRecord (const std::string& id) const;
|
||||
const Record<ESXRecordT>& getRecord (const std::string& id) const override;
|
||||
|
||||
virtual const Record<ESXRecordT>& getRecord (int index) const;
|
||||
const Record<ESXRecordT>& getRecord (int index) const override;
|
||||
|
||||
virtual int getAppendIndex (const std::string& id,
|
||||
UniversalId::Type type = UniversalId::Type_None) const;
|
||||
int getAppendIndex (const std::string& id,
|
||||
UniversalId::Type type = UniversalId::Type_None) const override;
|
||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||
|
||||
virtual std::vector<std::string> getIds (bool listDeleted = true) const;
|
||||
std::vector<std::string> getIds (bool listDeleted = true) const override;
|
||||
///< Return a sorted collection of all IDs
|
||||
///
|
||||
/// \param listDeleted include deleted record in the list
|
||||
|
@ -190,7 +190,7 @@ namespace CSMWorld
|
|||
/// If the index is invalid either generally (by being out of range) or for the particular
|
||||
/// record, an exception is thrown.
|
||||
|
||||
virtual bool reorderRows (int baseIndex, const std::vector<int>& newOrder);
|
||||
bool reorderRows (int baseIndex, const std::vector<int>& newOrder) override;
|
||||
///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices
|
||||
/// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
||||
///
|
||||
|
|
|
@ -211,13 +211,13 @@ namespace CSMWorld
|
|||
: Column<ESXRecordT> (id, ColumnBase::Display_NestedHeader, flags), mFixedRows(fixedRows)
|
||||
{}
|
||||
|
||||
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
||||
void set (Record<ESXRecordT>& record, const QVariant& data) override
|
||||
{
|
||||
// There is nothing to do here.
|
||||
// This prevents exceptions from parent's implementation
|
||||
}
|
||||
|
||||
virtual QVariant get (const Record<ESXRecordT>& record) const
|
||||
QVariant get (const Record<ESXRecordT>& record) const override
|
||||
{
|
||||
// by default editable; also see IdTree::hasChildren()
|
||||
if (mFixedRows)
|
||||
|
@ -226,7 +226,7 @@ namespace CSMWorld
|
|||
return QVariant::fromValue(ColumnBase::TableEdit_Full);
|
||||
}
|
||||
|
||||
virtual bool isEditable() const
|
||||
bool isEditable() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ namespace CSMWorld
|
|||
NestedChildColumn (int id,
|
||||
Display display, int flags = ColumnBase::Flag_Dialogue, bool isEditable = true);
|
||||
|
||||
virtual bool isEditable() const;
|
||||
bool isEditable() const override;
|
||||
|
||||
private:
|
||||
bool mIsEditable;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -142,9 +142,9 @@ namespace CSMWorld
|
|||
ModifyCommand (QAbstractItemModel& model, const QModelIndex& index, const QVariant& new_,
|
||||
QUndoCommand *parent = 0);
|
||||
|
||||
virtual void redo();
|
||||
void redo() override;
|
||||
|
||||
virtual void undo();
|
||||
void undo() override;
|
||||
};
|
||||
|
||||
class CreateCommand : public QUndoCommand
|
||||
|
@ -175,9 +175,9 @@ namespace CSMWorld
|
|||
|
||||
void addNestedValue(int parentColumn, int nestedColumn, const QVariant &value);
|
||||
|
||||
virtual void redo();
|
||||
void redo() override;
|
||||
|
||||
virtual void undo();
|
||||
void undo() override;
|
||||
};
|
||||
|
||||
class CloneCommand : public CreateCommand
|
||||
|
@ -191,9 +191,9 @@ namespace CSMWorld
|
|||
const UniversalId::Type type,
|
||||
QUndoCommand* parent = 0);
|
||||
|
||||
virtual void redo();
|
||||
void redo() override;
|
||||
|
||||
virtual void undo();
|
||||
void undo() override;
|
||||
};
|
||||
|
||||
class RevertCommand : public QUndoCommand
|
||||
|
@ -212,9 +212,9 @@ namespace CSMWorld
|
|||
|
||||
virtual ~RevertCommand();
|
||||
|
||||
virtual void redo();
|
||||
void redo() override;
|
||||
|
||||
virtual void undo();
|
||||
void undo() override;
|
||||
};
|
||||
|
||||
class DeleteCommand : public QUndoCommand
|
||||
|
@ -235,9 +235,9 @@ namespace CSMWorld
|
|||
|
||||
virtual ~DeleteCommand();
|
||||
|
||||
virtual void redo();
|
||||
void redo() override;
|
||||
|
||||
virtual void undo();
|
||||
void undo() override;
|
||||
};
|
||||
|
||||
class ReorderRowsCommand : public QUndoCommand
|
||||
|
@ -250,9 +250,9 @@ namespace CSMWorld
|
|||
|
||||
ReorderRowsCommand (IdTable& model, int baseIndex, const std::vector<int>& newOrder);
|
||||
|
||||
virtual void redo();
|
||||
void redo() override;
|
||||
|
||||
virtual void undo();
|
||||
void undo() override;
|
||||
};
|
||||
|
||||
class CreatePathgridCommand : public CreateCommand
|
||||
|
@ -261,7 +261,7 @@ namespace CSMWorld
|
|||
|
||||
CreatePathgridCommand(IdTable& model, const std::string& id, QUndoCommand *parent = 0);
|
||||
|
||||
virtual void redo();
|
||||
void redo() override;
|
||||
};
|
||||
|
||||
/// \brief Update cell ID according to x/y-coordinates
|
||||
|
@ -281,9 +281,9 @@ namespace CSMWorld
|
|||
|
||||
UpdateCellCommand (IdTable& model, int row, QUndoCommand *parent = 0);
|
||||
|
||||
virtual void redo();
|
||||
void redo() override;
|
||||
|
||||
virtual void undo();
|
||||
void undo() override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -318,9 +318,9 @@ namespace CSMWorld
|
|||
|
||||
DeleteNestedCommand (IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent = 0);
|
||||
|
||||
virtual void redo();
|
||||
void redo() override;
|
||||
|
||||
virtual void undo();
|
||||
void undo() override;
|
||||
};
|
||||
|
||||
class AddNestedCommand : public QUndoCommand, private NestedTableStoring
|
||||
|
@ -340,9 +340,9 @@ namespace CSMWorld
|
|||
|
||||
AddNestedCommand(IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent = 0);
|
||||
|
||||
virtual void redo();
|
||||
void redo() override;
|
||||
|
||||
virtual void undo();
|
||||
void undo() override;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -31,24 +31,23 @@ namespace CSMWorld
|
|||
|
||||
virtual ~IdTable();
|
||||
|
||||
virtual int rowCount (const QModelIndex & parent = QModelIndex()) const;
|
||||
int rowCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||
|
||||
virtual int columnCount (const QModelIndex & parent = QModelIndex()) const;
|
||||
int columnCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||
|
||||
virtual QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const;
|
||||
QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
virtual QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
||||
virtual bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
||||
bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
|
||||
virtual Qt::ItemFlags flags (const QModelIndex & index) const;
|
||||
Qt::ItemFlags flags (const QModelIndex & index) const override;
|
||||
|
||||
virtual bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex());
|
||||
bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex()) override;
|
||||
|
||||
virtual QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex())
|
||||
const;
|
||||
QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) const override;
|
||||
|
||||
virtual QModelIndex parent (const QModelIndex& index) const;
|
||||
QModelIndex parent (const QModelIndex& index) const override;
|
||||
|
||||
void addRecord (const std::string& id, UniversalId::Type type = UniversalId::Type_None);
|
||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||
|
@ -66,7 +65,7 @@ namespace CSMWorld
|
|||
|
||||
std::string getId(int row) const;
|
||||
|
||||
virtual QModelIndex getModelIndex (const std::string& id, int column) const;
|
||||
QModelIndex getModelIndex (const std::string& id, int column) const override;
|
||||
|
||||
void setRecord (const std::string& id, const RecordBase& record,
|
||||
UniversalId::Type type = UniversalId::Type_None);
|
||||
|
@ -74,10 +73,10 @@ namespace CSMWorld
|
|||
|
||||
const RecordBase& getRecord (const std::string& id) const;
|
||||
|
||||
virtual int searchColumnIndex (Columns::ColumnId id) const;
|
||||
int searchColumnIndex (Columns::ColumnId id) const override;
|
||||
///< Return index of column with the given \a id. If no such column exists, -1 is returned.
|
||||
|
||||
virtual int findColumnIndex (Columns::ColumnId id) const;
|
||||
int findColumnIndex (Columns::ColumnId id) const override;
|
||||
///< Return index of column with the given \a id. If no such column exists, an exception is
|
||||
/// thrown.
|
||||
|
||||
|
@ -85,14 +84,14 @@ namespace CSMWorld
|
|||
///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices
|
||||
/// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
||||
|
||||
virtual std::pair<UniversalId, std::string> view (int row) const;
|
||||
std::pair<UniversalId, std::string> view (int row) const override;
|
||||
///< Return the UniversalId and the hint for viewing \a row. If viewing is not
|
||||
/// supported by this table, return (UniversalId::Type_None, "").
|
||||
|
||||
/// Is \a id flagged as deleted?
|
||||
virtual bool isDeleted (const std::string& id) const;
|
||||
bool isDeleted (const std::string& id) const override;
|
||||
|
||||
virtual int getColumnId(int column) const;
|
||||
int getColumnId(int column) const override;
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace CSMWorld
|
|||
|
||||
virtual QModelIndex getModelIndex (const std::string& id, int column) const;
|
||||
|
||||
virtual void setSourceModel(QAbstractItemModel *model);
|
||||
void setSourceModel(QAbstractItemModel *model) override;
|
||||
|
||||
void setFilter (const std::shared_ptr<CSMFilter::Node>& filter);
|
||||
|
||||
|
@ -47,9 +47,9 @@ namespace CSMWorld
|
|||
|
||||
protected:
|
||||
|
||||
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
|
||||
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
|
||||
|
||||
virtual bool filterAcceptsRow (int sourceRow, const QModelIndex& sourceParent) const;
|
||||
bool filterAcceptsRow (int sourceRow, const QModelIndex& sourceParent) const override;
|
||||
|
||||
QString getRecordId(int sourceRow) const;
|
||||
|
||||
|
|
|
@ -44,22 +44,21 @@ namespace CSMWorld
|
|||
|
||||
virtual ~IdTree();
|
||||
|
||||
virtual int rowCount (const QModelIndex & parent = QModelIndex()) const;
|
||||
int rowCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||
|
||||
virtual int columnCount (const QModelIndex & parent = QModelIndex()) const;
|
||||
int columnCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||
|
||||
virtual QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const;
|
||||
QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
virtual bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
||||
bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
|
||||
virtual Qt::ItemFlags flags (const QModelIndex & index) const;
|
||||
Qt::ItemFlags flags (const QModelIndex & index) const override;
|
||||
|
||||
virtual bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex());
|
||||
bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex()) override;
|
||||
|
||||
virtual QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex())
|
||||
const;
|
||||
QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) const override;
|
||||
|
||||
virtual QModelIndex parent (const QModelIndex& index) const;
|
||||
QModelIndex parent (const QModelIndex& index) const override;
|
||||
|
||||
QModelIndex getNestedModelIndex (const std::string& id, int column) const;
|
||||
|
||||
|
@ -71,7 +70,7 @@ namespace CSMWorld
|
|||
|
||||
void addNestedRow (const QModelIndex& parent, int position);
|
||||
|
||||
virtual bool hasChildren (const QModelIndex& index) const;
|
||||
bool hasChildren (const QModelIndex& index) const override;
|
||||
|
||||
virtual int searchNestedColumnIndex(int parentColumn, Columns::ColumnId id);
|
||||
///< \return the column index or -1 if the requested column wasn't found.
|
||||
|
|
|
@ -29,11 +29,11 @@ namespace CSMWorld
|
|||
|
||||
public:
|
||||
|
||||
virtual int getAppendIndex (const std::string& id,
|
||||
UniversalId::Type type = UniversalId::Type_None) const;
|
||||
int getAppendIndex (const std::string& id,
|
||||
UniversalId::Type type = UniversalId::Type_None) const override;
|
||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||
|
||||
virtual bool reorderRows (int baseIndex, const std::vector<int>& newOrder);
|
||||
bool reorderRows (int baseIndex, const std::vector<int>& newOrder) override;
|
||||
///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices
|
||||
/// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
||||
///
|
||||
|
|
|
@ -30,15 +30,15 @@ namespace CSMWorld
|
|||
public:
|
||||
InfoTableProxyModel(UniversalId::Type type, QObject *parent = 0);
|
||||
|
||||
virtual void setSourceModel(QAbstractItemModel *sourceModel);
|
||||
void setSourceModel(QAbstractItemModel *sourceModel) override;
|
||||
|
||||
protected:
|
||||
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
|
||||
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
|
||||
|
||||
protected slots:
|
||||
virtual void sourceRowsInserted(const QModelIndex &parent, int start, int end);
|
||||
virtual void sourceRowsRemoved(const QModelIndex &parent, int start, int end);
|
||||
virtual void sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||
void sourceRowsInserted(const QModelIndex &parent, int start, int end) override;
|
||||
void sourceRowsRemoved(const QModelIndex &parent, int start, int end) override;
|
||||
void sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -30,24 +30,24 @@ namespace CSMWorld
|
|||
public:
|
||||
PathgridPointListAdapter ();
|
||||
|
||||
virtual void addRow(Record<Pathgrid>& record, int position) const;
|
||||
void addRow(Record<Pathgrid>& record, int position) const override;
|
||||
|
||||
virtual void removeRow(Record<Pathgrid>& record, int rowToRemove) const;
|
||||
void removeRow(Record<Pathgrid>& record, int rowToRemove) const override;
|
||||
|
||||
virtual void setTable(Record<Pathgrid>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const;
|
||||
void setTable(Record<Pathgrid>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const override;
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<Pathgrid>& record) const;
|
||||
NestedTableWrapperBase* table(const Record<Pathgrid>& record) const override;
|
||||
|
||||
virtual QVariant getData(const Record<Pathgrid>& record,
|
||||
int subRowIndex, int subColIndex) const;
|
||||
QVariant getData(const Record<Pathgrid>& record,
|
||||
int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual void setData(Record<Pathgrid>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
||||
void setData(Record<Pathgrid>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual int getColumnsCount(const Record<Pathgrid>& record) const;
|
||||
int getColumnsCount(const Record<Pathgrid>& record) const override;
|
||||
|
||||
virtual int getRowsCount(const Record<Pathgrid>& record) const;
|
||||
int getRowsCount(const Record<Pathgrid>& record) const override;
|
||||
};
|
||||
|
||||
class PathgridEdgeListAdapter : public NestedColumnAdapter<Pathgrid>
|
||||
|
@ -55,24 +55,24 @@ namespace CSMWorld
|
|||
public:
|
||||
PathgridEdgeListAdapter ();
|
||||
|
||||
virtual void addRow(Record<Pathgrid>& record, int position) const;
|
||||
void addRow(Record<Pathgrid>& record, int position) const override;
|
||||
|
||||
virtual void removeRow(Record<Pathgrid>& record, int rowToRemove) const;
|
||||
void removeRow(Record<Pathgrid>& record, int rowToRemove) const override;
|
||||
|
||||
virtual void setTable(Record<Pathgrid>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const;
|
||||
void setTable(Record<Pathgrid>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const override;
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<Pathgrid>& record) const;
|
||||
NestedTableWrapperBase* table(const Record<Pathgrid>& record) const override;
|
||||
|
||||
virtual QVariant getData(const Record<Pathgrid>& record,
|
||||
int subRowIndex, int subColIndex) const;
|
||||
QVariant getData(const Record<Pathgrid>& record,
|
||||
int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual void setData(Record<Pathgrid>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
||||
void setData(Record<Pathgrid>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual int getColumnsCount(const Record<Pathgrid>& record) const;
|
||||
int getColumnsCount(const Record<Pathgrid>& record) const override;
|
||||
|
||||
virtual int getRowsCount(const Record<Pathgrid>& record) const;
|
||||
int getRowsCount(const Record<Pathgrid>& record) const override;
|
||||
};
|
||||
|
||||
class FactionReactionsAdapter : public NestedColumnAdapter<ESM::Faction>
|
||||
|
@ -80,24 +80,24 @@ namespace CSMWorld
|
|||
public:
|
||||
FactionReactionsAdapter ();
|
||||
|
||||
virtual void addRow(Record<ESM::Faction>& record, int position) const;
|
||||
void addRow(Record<ESM::Faction>& record, int position) const override;
|
||||
|
||||
virtual void removeRow(Record<ESM::Faction>& record, int rowToRemove) const;
|
||||
void removeRow(Record<ESM::Faction>& record, int rowToRemove) const override;
|
||||
|
||||
virtual void setTable(Record<ESM::Faction>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const;
|
||||
void setTable(Record<ESM::Faction>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const override;
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<ESM::Faction>& record) const;
|
||||
NestedTableWrapperBase* table(const Record<ESM::Faction>& record) const override;
|
||||
|
||||
virtual QVariant getData(const Record<ESM::Faction>& record,
|
||||
int subRowIndex, int subColIndex) const;
|
||||
QVariant getData(const Record<ESM::Faction>& record,
|
||||
int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual void setData(Record<ESM::Faction>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
||||
void setData(Record<ESM::Faction>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual int getColumnsCount(const Record<ESM::Faction>& record) const;
|
||||
int getColumnsCount(const Record<ESM::Faction>& record) const override;
|
||||
|
||||
virtual int getRowsCount(const Record<ESM::Faction>& record) const;
|
||||
int getRowsCount(const Record<ESM::Faction>& record) const override;
|
||||
};
|
||||
|
||||
class FactionRanksAdapter : public NestedColumnAdapter<ESM::Faction>
|
||||
|
@ -105,24 +105,24 @@ namespace CSMWorld
|
|||
public:
|
||||
FactionRanksAdapter ();
|
||||
|
||||
virtual void addRow(Record<ESM::Faction>& record, int position) const;
|
||||
void addRow(Record<ESM::Faction>& record, int position) const override;
|
||||
|
||||
virtual void removeRow(Record<ESM::Faction>& record, int rowToRemove) const;
|
||||
void removeRow(Record<ESM::Faction>& record, int rowToRemove) const override;
|
||||
|
||||
virtual void setTable(Record<ESM::Faction>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const;
|
||||
void setTable(Record<ESM::Faction>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const override;
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<ESM::Faction>& record) const;
|
||||
NestedTableWrapperBase* table(const Record<ESM::Faction>& record) const override;
|
||||
|
||||
virtual QVariant getData(const Record<ESM::Faction>& record,
|
||||
int subRowIndex, int subColIndex) const;
|
||||
QVariant getData(const Record<ESM::Faction>& record,
|
||||
int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual void setData(Record<ESM::Faction>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
||||
void setData(Record<ESM::Faction>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual int getColumnsCount(const Record<ESM::Faction>& record) const;
|
||||
int getColumnsCount(const Record<ESM::Faction>& record) const override;
|
||||
|
||||
virtual int getRowsCount(const Record<ESM::Faction>& record) const;
|
||||
int getRowsCount(const Record<ESM::Faction>& record) const override;
|
||||
};
|
||||
|
||||
class RegionSoundListAdapter : public NestedColumnAdapter<ESM::Region>
|
||||
|
@ -130,24 +130,24 @@ namespace CSMWorld
|
|||
public:
|
||||
RegionSoundListAdapter ();
|
||||
|
||||
virtual void addRow(Record<ESM::Region>& record, int position) const;
|
||||
void addRow(Record<ESM::Region>& record, int position) const override;
|
||||
|
||||
virtual void removeRow(Record<ESM::Region>& record, int rowToRemove) const;
|
||||
void removeRow(Record<ESM::Region>& record, int rowToRemove) const override;
|
||||
|
||||
virtual void setTable(Record<ESM::Region>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const;
|
||||
void setTable(Record<ESM::Region>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const override;
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<ESM::Region>& record) const;
|
||||
NestedTableWrapperBase* table(const Record<ESM::Region>& record) const override;
|
||||
|
||||
virtual QVariant getData(const Record<ESM::Region>& record,
|
||||
int subRowIndex, int subColIndex) const;
|
||||
QVariant getData(const Record<ESM::Region>& record,
|
||||
int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual void setData(Record<ESM::Region>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
||||
void setData(Record<ESM::Region>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual int getColumnsCount(const Record<ESM::Region>& record) const;
|
||||
int getColumnsCount(const Record<ESM::Region>& record) const override;
|
||||
|
||||
virtual int getRowsCount(const Record<ESM::Region>& record) const;
|
||||
int getRowsCount(const Record<ESM::Region>& record) const override;
|
||||
};
|
||||
|
||||
template<typename ESXRecordT>
|
||||
|
@ -156,7 +156,7 @@ namespace CSMWorld
|
|||
public:
|
||||
SpellListAdapter () {}
|
||||
|
||||
virtual void addRow(Record<ESXRecordT>& record, int position) const
|
||||
void addRow(Record<ESXRecordT>& record, int position) const override
|
||||
{
|
||||
ESXRecordT raceOrBthSgn = record.get();
|
||||
|
||||
|
@ -170,7 +170,7 @@ namespace CSMWorld
|
|||
record.setModified (raceOrBthSgn);
|
||||
}
|
||||
|
||||
virtual void removeRow(Record<ESXRecordT>& record, int rowToRemove) const
|
||||
void removeRow(Record<ESXRecordT>& record, int rowToRemove) const override
|
||||
{
|
||||
ESXRecordT raceOrBthSgn = record.get();
|
||||
|
||||
|
@ -184,7 +184,7 @@ namespace CSMWorld
|
|||
record.setModified (raceOrBthSgn);
|
||||
}
|
||||
|
||||
virtual void setTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const
|
||||
void setTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const override
|
||||
{
|
||||
ESXRecordT raceOrBthSgn = record.get();
|
||||
|
||||
|
@ -194,13 +194,13 @@ namespace CSMWorld
|
|||
record.setModified (raceOrBthSgn);
|
||||
}
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<ESXRecordT>& record) const
|
||||
NestedTableWrapperBase* table(const Record<ESXRecordT>& record) const override
|
||||
{
|
||||
// deleted by dtor of NestedTableStoring
|
||||
return new NestedTableWrapper<std::vector<std::string> >(record.get().mPowers.mList);
|
||||
}
|
||||
|
||||
virtual QVariant getData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const
|
||||
QVariant getData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const override
|
||||
{
|
||||
ESXRecordT raceOrBthSgn = record.get();
|
||||
|
||||
|
@ -217,8 +217,8 @@ namespace CSMWorld
|
|||
}
|
||||
}
|
||||
|
||||
virtual void setData(Record<ESXRecordT>& record, const QVariant& value,
|
||||
int subRowIndex, int subColIndex) const
|
||||
void setData(Record<ESXRecordT>& record, const QVariant& value,
|
||||
int subRowIndex, int subColIndex) const override
|
||||
{
|
||||
ESXRecordT raceOrBthSgn = record.get();
|
||||
|
||||
|
@ -239,12 +239,12 @@ namespace CSMWorld
|
|||
record.setModified (raceOrBthSgn);
|
||||
}
|
||||
|
||||
virtual int getColumnsCount(const Record<ESXRecordT>& record) const
|
||||
int getColumnsCount(const Record<ESXRecordT>& record) const override
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
virtual int getRowsCount(const Record<ESXRecordT>& record) const
|
||||
int getRowsCount(const Record<ESXRecordT>& record) const override
|
||||
{
|
||||
return static_cast<int>(record.get().mPowers.mList.size());
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ namespace CSMWorld
|
|||
public:
|
||||
EffectsListAdapter () {}
|
||||
|
||||
virtual void addRow(Record<ESXRecordT>& record, int position) const
|
||||
void addRow(Record<ESXRecordT>& record, int position) const override
|
||||
{
|
||||
ESXRecordT magic = record.get();
|
||||
|
||||
|
@ -278,7 +278,7 @@ namespace CSMWorld
|
|||
record.setModified (magic);
|
||||
}
|
||||
|
||||
virtual void removeRow(Record<ESXRecordT>& record, int rowToRemove) const
|
||||
void removeRow(Record<ESXRecordT>& record, int rowToRemove) const override
|
||||
{
|
||||
ESXRecordT magic = record.get();
|
||||
|
||||
|
@ -292,7 +292,7 @@ namespace CSMWorld
|
|||
record.setModified (magic);
|
||||
}
|
||||
|
||||
virtual void setTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const
|
||||
void setTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const override
|
||||
{
|
||||
ESXRecordT magic = record.get();
|
||||
|
||||
|
@ -302,13 +302,13 @@ namespace CSMWorld
|
|||
record.setModified (magic);
|
||||
}
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<ESXRecordT>& record) const
|
||||
NestedTableWrapperBase* table(const Record<ESXRecordT>& record) const override
|
||||
{
|
||||
// deleted by dtor of NestedTableStoring
|
||||
return new NestedTableWrapper<std::vector<ESM::ENAMstruct> >(record.get().mEffects.mList);
|
||||
}
|
||||
|
||||
virtual QVariant getData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const
|
||||
QVariant getData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const override
|
||||
{
|
||||
ESXRecordT magic = record.get();
|
||||
|
||||
|
@ -370,8 +370,8 @@ namespace CSMWorld
|
|||
}
|
||||
}
|
||||
|
||||
virtual void setData(Record<ESXRecordT>& record, const QVariant& value,
|
||||
int subRowIndex, int subColIndex) const
|
||||
void setData(Record<ESXRecordT>& record, const QVariant& value,
|
||||
int subRowIndex, int subColIndex) const override
|
||||
{
|
||||
ESXRecordT magic = record.get();
|
||||
|
||||
|
@ -415,12 +415,12 @@ namespace CSMWorld
|
|||
record.setModified (magic);
|
||||
}
|
||||
|
||||
virtual int getColumnsCount(const Record<ESXRecordT>& record) const
|
||||
int getColumnsCount(const Record<ESXRecordT>& record) const override
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
virtual int getRowsCount(const Record<ESXRecordT>& record) const
|
||||
int getRowsCount(const Record<ESXRecordT>& record) const override
|
||||
{
|
||||
return static_cast<int>(record.get().mEffects.mList.size());
|
||||
}
|
||||
|
@ -431,24 +431,24 @@ namespace CSMWorld
|
|||
public:
|
||||
InfoListAdapter ();
|
||||
|
||||
virtual void addRow(Record<Info>& record, int position) const;
|
||||
void addRow(Record<Info>& record, int position) const override;
|
||||
|
||||
virtual void removeRow(Record<Info>& record, int rowToRemove) const;
|
||||
void removeRow(Record<Info>& record, int rowToRemove) const override;
|
||||
|
||||
virtual void setTable(Record<Info>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const;
|
||||
void setTable(Record<Info>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const override;
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<Info>& record) const;
|
||||
NestedTableWrapperBase* table(const Record<Info>& record) const override;
|
||||
|
||||
virtual QVariant getData(const Record<Info>& record,
|
||||
int subRowIndex, int subColIndex) const;
|
||||
QVariant getData(const Record<Info>& record,
|
||||
int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual void setData(Record<Info>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
||||
void setData(Record<Info>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual int getColumnsCount(const Record<Info>& record) const;
|
||||
int getColumnsCount(const Record<Info>& record) const override;
|
||||
|
||||
virtual int getRowsCount(const Record<Info>& record) const;
|
||||
int getRowsCount(const Record<Info>& record) const override;
|
||||
};
|
||||
|
||||
class InfoConditionAdapter : public NestedColumnAdapter<Info>
|
||||
|
@ -456,24 +456,24 @@ namespace CSMWorld
|
|||
public:
|
||||
InfoConditionAdapter ();
|
||||
|
||||
virtual void addRow(Record<Info>& record, int position) const;
|
||||
void addRow(Record<Info>& record, int position) const override;
|
||||
|
||||
virtual void removeRow(Record<Info>& record, int rowToRemove) const;
|
||||
void removeRow(Record<Info>& record, int rowToRemove) const override;
|
||||
|
||||
virtual void setTable(Record<Info>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const;
|
||||
void setTable(Record<Info>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const override;
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<Info>& record) const;
|
||||
NestedTableWrapperBase* table(const Record<Info>& record) const override;
|
||||
|
||||
virtual QVariant getData(const Record<Info>& record,
|
||||
int subRowIndex, int subColIndex) const;
|
||||
QVariant getData(const Record<Info>& record,
|
||||
int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual void setData(Record<Info>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
||||
void setData(Record<Info>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual int getColumnsCount(const Record<Info>& record) const;
|
||||
int getColumnsCount(const Record<Info>& record) const override;
|
||||
|
||||
virtual int getRowsCount(const Record<Info>& record) const;
|
||||
int getRowsCount(const Record<Info>& record) const override;
|
||||
};
|
||||
|
||||
class RaceAttributeAdapter : public NestedColumnAdapter<ESM::Race>
|
||||
|
@ -481,24 +481,24 @@ namespace CSMWorld
|
|||
public:
|
||||
RaceAttributeAdapter ();
|
||||
|
||||
virtual void addRow(Record<ESM::Race>& record, int position) const;
|
||||
void addRow(Record<ESM::Race>& record, int position) const override;
|
||||
|
||||
virtual void removeRow(Record<ESM::Race>& record, int rowToRemove) const;
|
||||
void removeRow(Record<ESM::Race>& record, int rowToRemove) const override;
|
||||
|
||||
virtual void setTable(Record<ESM::Race>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const;
|
||||
void setTable(Record<ESM::Race>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const override;
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<ESM::Race>& record) const;
|
||||
NestedTableWrapperBase* table(const Record<ESM::Race>& record) const override;
|
||||
|
||||
virtual QVariant getData(const Record<ESM::Race>& record,
|
||||
int subRowIndex, int subColIndex) const;
|
||||
QVariant getData(const Record<ESM::Race>& record,
|
||||
int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual void setData(Record<ESM::Race>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
||||
void setData(Record<ESM::Race>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual int getColumnsCount(const Record<ESM::Race>& record) const;
|
||||
int getColumnsCount(const Record<ESM::Race>& record) const override;
|
||||
|
||||
virtual int getRowsCount(const Record<ESM::Race>& record) const;
|
||||
int getRowsCount(const Record<ESM::Race>& record) const override;
|
||||
};
|
||||
|
||||
class RaceSkillsBonusAdapter : public NestedColumnAdapter<ESM::Race>
|
||||
|
@ -506,24 +506,24 @@ namespace CSMWorld
|
|||
public:
|
||||
RaceSkillsBonusAdapter ();
|
||||
|
||||
virtual void addRow(Record<ESM::Race>& record, int position) const;
|
||||
void addRow(Record<ESM::Race>& record, int position) const override;
|
||||
|
||||
virtual void removeRow(Record<ESM::Race>& record, int rowToRemove) const;
|
||||
void removeRow(Record<ESM::Race>& record, int rowToRemove) const override;
|
||||
|
||||
virtual void setTable(Record<ESM::Race>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const;
|
||||
void setTable(Record<ESM::Race>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const override;
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<ESM::Race>& record) const;
|
||||
NestedTableWrapperBase* table(const Record<ESM::Race>& record) const override;
|
||||
|
||||
virtual QVariant getData(const Record<ESM::Race>& record,
|
||||
int subRowIndex, int subColIndex) const;
|
||||
QVariant getData(const Record<ESM::Race>& record,
|
||||
int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual void setData(Record<ESM::Race>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
||||
void setData(Record<ESM::Race>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual int getColumnsCount(const Record<ESM::Race>& record) const;
|
||||
int getColumnsCount(const Record<ESM::Race>& record) const override;
|
||||
|
||||
virtual int getRowsCount(const Record<ESM::Race>& record) const;
|
||||
int getRowsCount(const Record<ESM::Race>& record) const override;
|
||||
};
|
||||
|
||||
class CellListAdapter : public NestedColumnAdapter<CSMWorld::Cell>
|
||||
|
@ -531,24 +531,24 @@ namespace CSMWorld
|
|||
public:
|
||||
CellListAdapter ();
|
||||
|
||||
virtual void addRow(Record<CSMWorld::Cell>& record, int position) const;
|
||||
void addRow(Record<CSMWorld::Cell>& record, int position) const override;
|
||||
|
||||
virtual void removeRow(Record<CSMWorld::Cell>& record, int rowToRemove) const;
|
||||
void removeRow(Record<CSMWorld::Cell>& record, int rowToRemove) const override;
|
||||
|
||||
virtual void setTable(Record<CSMWorld::Cell>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const;
|
||||
void setTable(Record<CSMWorld::Cell>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const override;
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<CSMWorld::Cell>& record) const;
|
||||
NestedTableWrapperBase* table(const Record<CSMWorld::Cell>& record) const override;
|
||||
|
||||
virtual QVariant getData(const Record<CSMWorld::Cell>& record,
|
||||
int subRowIndex, int subColIndex) const;
|
||||
QVariant getData(const Record<CSMWorld::Cell>& record,
|
||||
int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual void setData(Record<CSMWorld::Cell>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
||||
void setData(Record<CSMWorld::Cell>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual int getColumnsCount(const Record<CSMWorld::Cell>& record) const;
|
||||
int getColumnsCount(const Record<CSMWorld::Cell>& record) const override;
|
||||
|
||||
virtual int getRowsCount(const Record<CSMWorld::Cell>& record) const;
|
||||
int getRowsCount(const Record<CSMWorld::Cell>& record) const override;
|
||||
};
|
||||
|
||||
class RegionWeatherAdapter : public NestedColumnAdapter<ESM::Region>
|
||||
|
@ -556,24 +556,24 @@ namespace CSMWorld
|
|||
public:
|
||||
RegionWeatherAdapter ();
|
||||
|
||||
virtual void addRow(Record<ESM::Region>& record, int position) const;
|
||||
void addRow(Record<ESM::Region>& record, int position) const override;
|
||||
|
||||
virtual void removeRow(Record<ESM::Region>& record, int rowToRemove) const;
|
||||
void removeRow(Record<ESM::Region>& record, int rowToRemove) const override;
|
||||
|
||||
virtual void setTable(Record<ESM::Region>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const;
|
||||
void setTable(Record<ESM::Region>& record,
|
||||
const NestedTableWrapperBase& nestedTable) const override;
|
||||
|
||||
virtual NestedTableWrapperBase* table(const Record<ESM::Region>& record) const;
|
||||
NestedTableWrapperBase* table(const Record<ESM::Region>& record) const override;
|
||||
|
||||
virtual QVariant getData(const Record<ESM::Region>& record,
|
||||
int subRowIndex, int subColIndex) const;
|
||||
QVariant getData(const Record<ESM::Region>& record,
|
||||
int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual void setData(Record<ESM::Region>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
||||
void setData(Record<ESM::Region>& record,
|
||||
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||
|
||||
virtual int getColumnsCount(const Record<ESM::Region>& record) const;
|
||||
int getColumnsCount(const Record<ESM::Region>& record) const override;
|
||||
|
||||
virtual int getRowsCount(const Record<ESM::Region>& record) const;
|
||||
int getRowsCount(const Record<ESM::Region>& record) const override;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -32,24 +32,24 @@ namespace CSMWorld
|
|||
NestedIdCollection ();
|
||||
~NestedIdCollection();
|
||||
|
||||
virtual void addNestedRow(int row, int column, int position);
|
||||
void addNestedRow(int row, int column, int position) override;
|
||||
|
||||
virtual void removeNestedRows(int row, int column, int subRow);
|
||||
void removeNestedRows(int row, int column, int subRow) override;
|
||||
|
||||
virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const;
|
||||
QVariant getNestedData(int row, int column, int subRow, int subColumn) const override;
|
||||
|
||||
virtual void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn);
|
||||
void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn) override;
|
||||
|
||||
virtual NestedTableWrapperBase* nestedTable(int row, int column) const;
|
||||
NestedTableWrapperBase* nestedTable(int row, int column) const override;
|
||||
|
||||
virtual void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable);
|
||||
void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable) override;
|
||||
|
||||
virtual int getNestedRowsCount(int row, int column) const;
|
||||
int getNestedRowsCount(int row, int column) const override;
|
||||
|
||||
virtual int getNestedColumnsCount(int row, int column) const;
|
||||
int getNestedColumnsCount(int row, int column) const override;
|
||||
|
||||
// this method is inherited from NestedCollection, not from Collection<ESXRecordT>
|
||||
virtual NestableColumn *getNestableColumn(int column);
|
||||
NestableColumn *getNestableColumn(int column) override;
|
||||
|
||||
void addAdapter(std::pair<const ColumnBase*, NestedColumnAdapter<ESXRecordT>* > adapter);
|
||||
};
|
||||
|
|
|
@ -24,24 +24,24 @@ namespace CSMWorld
|
|||
NestedInfoCollection ();
|
||||
~NestedInfoCollection();
|
||||
|
||||
virtual void addNestedRow(int row, int column, int position);
|
||||
void addNestedRow(int row, int column, int position) override;
|
||||
|
||||
virtual void removeNestedRows(int row, int column, int subRow);
|
||||
void removeNestedRows(int row, int column, int subRow) override;
|
||||
|
||||
virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const;
|
||||
QVariant getNestedData(int row, int column, int subRow, int subColumn) const override;
|
||||
|
||||
virtual void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn);
|
||||
void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn) override;
|
||||
|
||||
virtual NestedTableWrapperBase* nestedTable(int row, int column) const;
|
||||
NestedTableWrapperBase* nestedTable(int row, int column) const override;
|
||||
|
||||
virtual void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable);
|
||||
void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable) override;
|
||||
|
||||
virtual int getNestedRowsCount(int row, int column) const;
|
||||
int getNestedRowsCount(int row, int column) const override;
|
||||
|
||||
virtual int getNestedColumnsCount(int row, int column) const;
|
||||
int getNestedColumnsCount(int row, int column) const override;
|
||||
|
||||
// this method is inherited from NestedCollection, not from Collection<Info, IdAccessor<Info> >
|
||||
virtual NestableColumn *getNestableColumn(int column);
|
||||
NestableColumn *getNestableColumn(int column) override;
|
||||
|
||||
void addAdapter(std::pair<const ColumnBase*, NestedColumnAdapter<Info>* > adapter);
|
||||
};
|
||||
|
|
|
@ -39,25 +39,25 @@ namespace CSMWorld
|
|||
|
||||
CSMWorld::IdTree* model() const;
|
||||
|
||||
virtual QModelIndex mapFromSource(const QModelIndex& sourceIndex) const;
|
||||
QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override;
|
||||
|
||||
virtual QModelIndex mapToSource(const QModelIndex& proxyIndex) const;
|
||||
QModelIndex mapToSource(const QModelIndex& proxyIndex) const override;
|
||||
|
||||
virtual int rowCount(const QModelIndex& parent) const;
|
||||
int rowCount(const QModelIndex& parent) const override;
|
||||
|
||||
virtual int columnCount(const QModelIndex& parent) const;
|
||||
int columnCount(const QModelIndex& parent) const override;
|
||||
|
||||
virtual QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
|
||||
QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
|
||||
|
||||
virtual QModelIndex parent(const QModelIndex& index) const;
|
||||
QModelIndex parent(const QModelIndex& index) const override;
|
||||
|
||||
virtual QVariant headerData (int section, Qt::Orientation orientation, int role) const;
|
||||
QVariant headerData (int section, Qt::Orientation orientation, int role) const override;
|
||||
|
||||
virtual QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
virtual bool setData (const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
|
||||
bool setData (const QModelIndex & index, const QVariant & value, int role = Qt::EditRole) override;
|
||||
|
||||
virtual Qt::ItemFlags flags(const QModelIndex& index) const;
|
||||
Qt::ItemFlags flags(const QModelIndex& index) const override;
|
||||
|
||||
private:
|
||||
void setupHeaderVectors(ColumnBase::Display columnId);
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace CSMWorld
|
|||
|
||||
virtual ~NestedTableWrapper() {}
|
||||
|
||||
virtual int size() const
|
||||
int size() const override
|
||||
{
|
||||
return mNestedTable.size(); //i hope that this will be enough
|
||||
}
|
||||
|
|
|
@ -45,11 +45,11 @@ namespace CSMWorld
|
|||
Record(State state,
|
||||
const ESXRecordT *base = 0, const ESXRecordT *modified = 0);
|
||||
|
||||
virtual RecordBase *clone() const;
|
||||
RecordBase *clone() const override;
|
||||
|
||||
virtual RecordBase *modifiedCopy() const;
|
||||
RecordBase *modifiedCopy() const override;
|
||||
|
||||
virtual void assign (const RecordBase& record);
|
||||
void assign (const RecordBase& record) override;
|
||||
|
||||
const ESXRecordT& get() const;
|
||||
///< Throws an exception, if the record is deleted.
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -32,9 +32,9 @@ namespace CSMWorld
|
|||
int flag = Flag_Table | Flag_Dialogue, bool editable = true,
|
||||
bool userEditable = true);
|
||||
|
||||
virtual bool isEditable() const;
|
||||
bool isEditable() const override;
|
||||
|
||||
virtual bool isUserEditable() const;
|
||||
bool isUserEditable() const override;
|
||||
};
|
||||
|
||||
class RefIdCollection : public CollectionBase, public NestedCollection
|
||||
|
@ -60,82 +60,82 @@ namespace CSMWorld
|
|||
|
||||
virtual ~RefIdCollection();
|
||||
|
||||
virtual int getSize() const;
|
||||
int getSize() const override;
|
||||
|
||||
virtual std::string getId (int index) const;
|
||||
std::string getId (int index) const override;
|
||||
|
||||
virtual int getIndex (const std::string& id) const;
|
||||
int getIndex (const std::string& id) const override;
|
||||
|
||||
virtual int getColumns() const;
|
||||
int getColumns() const override;
|
||||
|
||||
virtual const ColumnBase& getColumn (int column) const;
|
||||
const ColumnBase& getColumn (int column) const override;
|
||||
|
||||
virtual QVariant getData (int index, int column) const;
|
||||
QVariant getData (int index, int column) const override;
|
||||
|
||||
virtual void setData (int index, int column, const QVariant& data);
|
||||
void setData (int index, int column, const QVariant& data) override;
|
||||
|
||||
virtual void removeRows (int index, int count);
|
||||
void removeRows (int index, int count) override;
|
||||
|
||||
virtual void cloneRecord(const std::string& origin,
|
||||
void cloneRecord(const std::string& origin,
|
||||
const std::string& destination,
|
||||
const UniversalId::Type type);
|
||||
const UniversalId::Type type) override;
|
||||
|
||||
virtual bool touchRecord(const std::string& id);
|
||||
bool touchRecord(const std::string& id) override;
|
||||
|
||||
virtual void appendBlankRecord (const std::string& id, UniversalId::Type type);
|
||||
void appendBlankRecord (const std::string& id, UniversalId::Type type) override;
|
||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||
|
||||
virtual int searchId (const std::string& id) const;
|
||||
int searchId (const std::string& id) const override;
|
||||
////< Search record with \a id.
|
||||
/// \return index of record (if found) or -1 (not found)
|
||||
|
||||
virtual void replace (int index, const RecordBase& record);
|
||||
void replace (int index, const RecordBase& record) override;
|
||||
///< If the record type does not match, an exception is thrown.
|
||||
///
|
||||
/// \attention \a record must not change the ID.
|
||||
|
||||
virtual void appendRecord (const RecordBase& record, UniversalId::Type type);
|
||||
void appendRecord (const RecordBase& record, UniversalId::Type type) override;
|
||||
///< If the record type does not match, an exception is thrown.
|
||||
///
|
||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||
|
||||
virtual const RecordBase& getRecord (const std::string& id) const;
|
||||
const RecordBase& getRecord (const std::string& id) const override;
|
||||
|
||||
virtual const RecordBase& getRecord (int index) const;
|
||||
const RecordBase& getRecord (int index) const override;
|
||||
|
||||
void load (ESM::ESMReader& reader, bool base, UniversalId::Type type);
|
||||
|
||||
virtual int getAppendIndex (const std::string& id, UniversalId::Type type) const;
|
||||
int getAppendIndex (const std::string& id, UniversalId::Type type) const override;
|
||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||
|
||||
virtual std::vector<std::string> getIds (bool listDeleted) const;
|
||||
std::vector<std::string> getIds (bool listDeleted) const override;
|
||||
///< Return a sorted collection of all IDs
|
||||
///
|
||||
/// \param listDeleted include deleted record in the list
|
||||
|
||||
virtual bool reorderRows (int baseIndex, const std::vector<int>& newOrder);
|
||||
bool reorderRows (int baseIndex, const std::vector<int>& newOrder) override;
|
||||
///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices
|
||||
/// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
||||
///
|
||||
/// \return Success?
|
||||
|
||||
virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const;
|
||||
QVariant getNestedData(int row, int column, int subRow, int subColumn) const override;
|
||||
|
||||
virtual NestedTableWrapperBase* nestedTable(int row, int column) const;
|
||||
NestedTableWrapperBase* nestedTable(int row, int column) const override;
|
||||
|
||||
virtual void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable);
|
||||
void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable) override;
|
||||
|
||||
virtual int getNestedRowsCount(int row, int column) const;
|
||||
int getNestedRowsCount(int row, int column) const override;
|
||||
|
||||
virtual int getNestedColumnsCount(int row, int column) const;
|
||||
int getNestedColumnsCount(int row, int column) const override;
|
||||
|
||||
NestableColumn *getNestableColumn(int column);
|
||||
NestableColumn *getNestableColumn(int column) override;
|
||||
|
||||
virtual void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn);
|
||||
void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn) override;
|
||||
|
||||
virtual void removeNestedRows(int row, int column, int subRow);
|
||||
void removeNestedRows(int row, int column, int subRow) override;
|
||||
|
||||
virtual void addNestedRow(int row, int col, int position);
|
||||
void addNestedRow(int row, int col, int position) override;
|
||||
|
||||
void save (int index, ESM::ESMWriter& writer) const;
|
||||
|
||||
|
|
|
@ -66,24 +66,24 @@ namespace CSMWorld
|
|||
{
|
||||
std::vector<Record<RecordT> > mContainer;
|
||||
|
||||
virtual int getSize() const;
|
||||
int getSize() const override;
|
||||
|
||||
virtual const RecordBase& getRecord (int index) const;
|
||||
const RecordBase& getRecord (int index) const override;
|
||||
|
||||
virtual RecordBase& getRecord (int index);
|
||||
RecordBase& getRecord (int index) override;
|
||||
|
||||
virtual void appendRecord (const std::string& id, bool base);
|
||||
void appendRecord (const std::string& id, bool base) override;
|
||||
|
||||
virtual void insertRecord (RecordBase& record);
|
||||
void insertRecord (RecordBase& record) override;
|
||||
|
||||
virtual int load (ESM::ESMReader& reader, bool base);
|
||||
int load (ESM::ESMReader& reader, bool base) override;
|
||||
///< \return index of a loaded record or -1 if no record was loaded
|
||||
|
||||
virtual void erase (int index, int count);
|
||||
void erase (int index, int count) override;
|
||||
|
||||
virtual std::string getId (int index) const;
|
||||
std::string getId (int index) const override;
|
||||
|
||||
virtual void save (int index, ESM::ESMWriter& writer) const;
|
||||
void save (int index, ESM::ESMWriter& writer) const override;
|
||||
};
|
||||
|
||||
template<typename RecordT>
|
||||
|
|
|
@ -91,15 +91,15 @@ namespace CSMWorld
|
|||
|
||||
RegionMap (Data& data);
|
||||
|
||||
virtual int rowCount (const QModelIndex& parent = QModelIndex()) const;
|
||||
int rowCount (const QModelIndex& parent = QModelIndex()) const override;
|
||||
|
||||
virtual int columnCount (const QModelIndex& parent = QModelIndex()) const;
|
||||
int columnCount (const QModelIndex& parent = QModelIndex()) const override;
|
||||
|
||||
virtual QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const;
|
||||
QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||
///< \note Calling this function with role==Role_CellId may return the ID of a cell
|
||||
/// that does not exist.
|
||||
|
||||
virtual Qt::ItemFlags flags (const QModelIndex& index) const;
|
||||
Qt::ItemFlags flags (const QModelIndex& index) const override;
|
||||
|
||||
private slots:
|
||||
|
||||
|
|
|
@ -18,41 +18,40 @@ namespace CSMWorld
|
|||
|
||||
virtual ~ResourceTable();
|
||||
|
||||
virtual int rowCount (const QModelIndex & parent = QModelIndex()) const;
|
||||
int rowCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||
|
||||
virtual int columnCount (const QModelIndex & parent = QModelIndex()) const;
|
||||
int columnCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||
|
||||
virtual QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const;
|
||||
QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
virtual QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
||||
virtual bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
||||
bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
|
||||
virtual Qt::ItemFlags flags (const QModelIndex & index) const;
|
||||
Qt::ItemFlags flags (const QModelIndex & index) const override;
|
||||
|
||||
virtual QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex())
|
||||
const;
|
||||
QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) const override;
|
||||
|
||||
virtual QModelIndex parent (const QModelIndex& index) const;
|
||||
QModelIndex parent (const QModelIndex& index) const override;
|
||||
|
||||
virtual QModelIndex getModelIndex (const std::string& id, int column) const;
|
||||
QModelIndex getModelIndex (const std::string& id, int column) const override;
|
||||
|
||||
/// Return index of column with the given \a id. If no such column exists, -1 is
|
||||
/// returned.
|
||||
virtual int searchColumnIndex (Columns::ColumnId id) const;
|
||||
int searchColumnIndex (Columns::ColumnId id) const override;
|
||||
|
||||
/// Return index of column with the given \a id. If no such column exists, an
|
||||
/// exception is thrown.
|
||||
virtual int findColumnIndex (Columns::ColumnId id) const;
|
||||
int findColumnIndex (Columns::ColumnId id) const override;
|
||||
|
||||
/// Return the UniversalId and the hint for viewing \a row. If viewing is not
|
||||
/// supported by this table, return (UniversalId::Type_None, "").
|
||||
virtual std::pair<UniversalId, std::string> view (int row) const;
|
||||
std::pair<UniversalId, std::string> view (int row) const override;
|
||||
|
||||
/// Is \a id flagged as deleted?
|
||||
virtual bool isDeleted (const std::string& id) const;
|
||||
bool isDeleted (const std::string& id) const override;
|
||||
|
||||
virtual int getColumnId (int column) const;
|
||||
int getColumnId (int column) const override;
|
||||
|
||||
/// Signal Qt that the data is about to change.
|
||||
void beginReset();
|
||||
|
|
|
@ -23,23 +23,23 @@ namespace CSMWorld
|
|||
|
||||
ScriptContext (const Data& data);
|
||||
|
||||
virtual bool canDeclareLocals() const;
|
||||
bool canDeclareLocals() const override;
|
||||
///< Is the compiler allowed to declare local variables?
|
||||
|
||||
virtual char getGlobalType (const std::string& name) const;
|
||||
char getGlobalType (const std::string& name) const override;
|
||||
///< 'l: long, 's': short, 'f': float, ' ': does not exist.
|
||||
|
||||
virtual std::pair<char, bool> getMemberType (const std::string& name,
|
||||
const std::string& id) const;
|
||||
std::pair<char, bool> getMemberType (const std::string& name,
|
||||
const std::string& id) const override;
|
||||
///< Return type of member variable \a name in script \a id or in script of reference of
|
||||
/// \a id
|
||||
/// \return first: 'l: long, 's': short, 'f': float, ' ': does not exist.
|
||||
/// second: true: script of reference
|
||||
|
||||
virtual bool isId (const std::string& name) const;
|
||||
bool isId (const std::string& name) const override;
|
||||
///< Does \a name match an ID, that can be referenced?
|
||||
|
||||
virtual bool isJournalId (const std::string& name) const;
|
||||
bool isJournalId (const std::string& name) const override;
|
||||
///< Does \a name match a journal ID?
|
||||
|
||||
void invalidateIds();
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace CSMWorld
|
|||
{
|
||||
const IdCollection<Cell>& mCells;
|
||||
|
||||
virtual void loadRecord (ESXRecordT& record, ESM::ESMReader& reader, bool& isDeleted);
|
||||
void loadRecord (ESXRecordT& record, ESM::ESMReader& reader, bool& isDeleted) override;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace CSMWorld
|
|||
|
||||
~TableMimeData();
|
||||
|
||||
virtual QStringList formats() const;
|
||||
QStringList formats() const override;
|
||||
|
||||
std::string getIcon() const;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace CSVDoc
|
|||
|
||||
private:
|
||||
|
||||
void closeEvent (QCloseEvent *event);
|
||||
void closeEvent (QCloseEvent *event) override;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace CSVDoc
|
|||
|
||||
void create();
|
||||
|
||||
void reject();
|
||||
void reject() override;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace CSVDoc
|
|||
|
||||
RunLogSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document);
|
||||
|
||||
virtual void setEditLock (bool locked);
|
||||
void setEditLock (bool locked) override;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace CSVDoc
|
|||
SizeHintWidget(QWidget *parent = 0);
|
||||
~SizeHintWidget();
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
void setSizeHint(const QSize &size);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace CSVDoc
|
|||
|
||||
void setUniversalId(const CSMWorld::UniversalId& id);
|
||||
|
||||
bool event (QEvent *event);
|
||||
bool event (QEvent *event) override;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace CSVDoc
|
|||
|
||||
private:
|
||||
|
||||
void closeEvent (QCloseEvent *event);
|
||||
void closeEvent (QCloseEvent *event) override;
|
||||
|
||||
signals:
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace CSVDoc
|
|||
{
|
||||
public:
|
||||
|
||||
virtual CSVDoc::SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document);
|
||||
CSVDoc::SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) override;
|
||||
};
|
||||
|
||||
template<class SubViewT>
|
||||
|
@ -32,7 +32,7 @@ namespace CSVDoc
|
|||
|
||||
SubViewFactoryWithCreator (bool sorting = true);
|
||||
|
||||
virtual CSVDoc::SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document);
|
||||
CSVDoc::SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) override;
|
||||
};
|
||||
|
||||
template<class SubViewT, class CreatorFactoryT>
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace CSVDoc
|
|||
|
||||
private:
|
||||
|
||||
void closeEvent (QCloseEvent *event);
|
||||
void closeEvent (QCloseEvent *event) override;
|
||||
|
||||
QAction* createMenuEntry(CSMWorld::UniversalId::Type type, QMenu* menu, const char* shortcutName);
|
||||
QAction* createMenuEntry(const std::string& title, const std::string& iconName, QMenu* menu, const char* shortcutName);
|
||||
|
|
|
@ -34,11 +34,11 @@ namespace CSVFilter
|
|||
|
||||
|
||||
private:
|
||||
void dragEnterEvent (QDragEnterEvent* event);
|
||||
void dragEnterEvent (QDragEnterEvent* event) override;
|
||||
|
||||
void dropEvent (QDropEvent* event);
|
||||
void dropEvent (QDropEvent* event) override;
|
||||
|
||||
void dragMoveEvent(QDragMoveEvent *event);
|
||||
void dragMoveEvent(QDragMoveEvent *event) override;
|
||||
|
||||
signals:
|
||||
void recordFilterChanged (std::shared_ptr<CSMFilter::Node> filter);
|
||||
|
|
|
@ -18,9 +18,9 @@ namespace CSVPrefs
|
|||
|
||||
protected:
|
||||
|
||||
void contextMenuEvent(QContextMenuEvent* e);
|
||||
void contextMenuEvent(QContextMenuEvent* e) override;
|
||||
|
||||
void mousePressEvent(QMouseEvent* e);
|
||||
void mousePressEvent(QMouseEvent* e) override;
|
||||
|
||||
private slots:
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace CSVPrefs
|
|||
|
||||
protected:
|
||||
|
||||
void closeEvent (QCloseEvent *event);
|
||||
void closeEvent (QCloseEvent *event) override;
|
||||
|
||||
public slots:
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace CSVPrefs
|
|||
|
||||
protected:
|
||||
|
||||
void contextMenuEvent(QContextMenuEvent*);
|
||||
void contextMenuEvent(QContextMenuEvent*) override;
|
||||
|
||||
private slots:
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue