mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-06 20:51:35 +00:00
Merge remote-tracking branch 'remotes/origin/master' into multiview_test_branch
This commit is contained in:
commit
c870749c39
831 changed files with 10276 additions and 6818 deletions
|
@ -13,12 +13,12 @@ stages:
|
||||||
before_script:
|
before_script:
|
||||||
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
|
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
|
||||||
- apt-get update -yq
|
- 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 git clang
|
- 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
|
stage: build
|
||||||
script:
|
script:
|
||||||
- export CCACHE_BASEDIR="`pwd`"
|
- export CCACHE_BASEDIR="`pwd`"
|
||||||
- export CCACHE_DIR="`pwd`/ccache" && mkdir -pv "$CCACHE_DIR"
|
- export CCACHE_DIR="`pwd`/ccache" && mkdir -pv "$CCACHE_DIR"
|
||||||
- ccache -z -M 1G
|
- ccache -z -M "${CCACHE_SIZE}"
|
||||||
- CI/before_script.linux.sh
|
- CI/before_script.linux.sh
|
||||||
- cd build
|
- cd build
|
||||||
- cmake --build . -- -j $(nproc)
|
- cmake --build . -- -j $(nproc)
|
||||||
|
@ -32,53 +32,60 @@ stages:
|
||||||
Debian_GCC:
|
Debian_GCC:
|
||||||
extends: .Debian
|
extends: .Debian
|
||||||
cache:
|
cache:
|
||||||
key: Debian_GCC.v1
|
key: Debian_GCC.v2
|
||||||
variables:
|
variables:
|
||||||
CC: gcc
|
CC: gcc
|
||||||
CXX: g++
|
CXX: g++
|
||||||
|
CCACHE_SIZE: 3G
|
||||||
|
# When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks.
|
||||||
|
timeout: 2h
|
||||||
|
|
||||||
Debian_GCC_tests:
|
Debian_GCC_tests:
|
||||||
extends: .Debian
|
extends: .Debian
|
||||||
cache:
|
cache:
|
||||||
key: Debian_GCC_tests.v1
|
key: Debian_GCC_tests.v2
|
||||||
variables:
|
variables:
|
||||||
CC: gcc
|
CC: gcc
|
||||||
CXX: g++
|
CXX: g++
|
||||||
|
CCACHE_SIZE: 1G
|
||||||
BUILD_TESTS_ONLY: 1
|
BUILD_TESTS_ONLY: 1
|
||||||
|
|
||||||
Debian_Clang:
|
Debian_Clang:
|
||||||
extends: .Debian
|
extends: .Debian
|
||||||
cache:
|
cache:
|
||||||
key: Debian_Clang.v1
|
key: Debian_Clang.v2
|
||||||
variables:
|
variables:
|
||||||
CC: clang
|
CC: clang
|
||||||
CXX: clang++
|
CXX: clang++
|
||||||
|
CCACHE_SIZE: 2G
|
||||||
|
|
||||||
Debian_Clang_tests:
|
Debian_Clang_tests:
|
||||||
extends: .Debian
|
extends: .Debian
|
||||||
cache:
|
cache:
|
||||||
key: Debian_Clang_tests.v1
|
key: Debian_Clang_tests.v2
|
||||||
variables:
|
variables:
|
||||||
CC: clang
|
CC: clang
|
||||||
CXX: clang++
|
CXX: clang++
|
||||||
|
CCACHE_SIZE: 1G
|
||||||
BUILD_TESTS_ONLY: 1
|
BUILD_TESTS_ONLY: 1
|
||||||
|
|
||||||
MacOS:
|
MacOS:
|
||||||
tags:
|
tags:
|
||||||
- macos
|
- macos
|
||||||
- xcode
|
|
||||||
except:
|
|
||||||
- branches # because our CI VMs are not public, MRs can't use them and timeout
|
|
||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
only:
|
||||||
|
variables:
|
||||||
|
- $CI_PROJECT_ID == "7107382"
|
||||||
script:
|
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_install.osx.sh
|
||||||
- CI/before_script.osx.sh
|
- CI/before_script.osx.sh
|
||||||
- cd build; make -j2 package
|
- cd build; make -j2 package
|
||||||
|
- for dmg in *.dmg; do mv "$dmg" "${dmg%.dmg}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.dmg"; done
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- build/OpenMW-*.dmg
|
- build/OpenMW-*.dmg
|
||||||
|
- "build/**/*.log"
|
||||||
|
|
||||||
variables: &engine-targets
|
variables: &engine-targets
|
||||||
targets: "openmw,openmw-essimporter,openmw-iniimporter,openmw-launcher,openmw-wizard"
|
targets: "openmw,openmw-essimporter,openmw-iniimporter,openmw-launcher,openmw-wizard"
|
||||||
|
@ -91,7 +98,7 @@ variables: &cs-targets
|
||||||
- windows
|
- windows
|
||||||
before_script:
|
before_script:
|
||||||
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||||
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolately/" --priority=1
|
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolatey/" --priority=1
|
||||||
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
||||||
- choco install 7zip -y
|
- choco install 7zip -y
|
||||||
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||||
|
@ -115,6 +122,8 @@ variables: &cs-targets
|
||||||
Get-ChildItem -Recurse *.pdb | Remove-Item
|
Get-ChildItem -Recurse *.pdb | Remove-Item
|
||||||
}
|
}
|
||||||
- 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*'
|
- 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*'
|
||||||
|
after_script:
|
||||||
|
- Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log
|
||||||
cache:
|
cache:
|
||||||
key: ninja-v2
|
key: ninja-v2
|
||||||
paths:
|
paths:
|
||||||
|
@ -181,7 +190,7 @@ Windows_Ninja_CS_RelWithDebInfo:
|
||||||
- windows
|
- windows
|
||||||
before_script:
|
before_script:
|
||||||
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||||
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolately/" --priority=1
|
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolatey/" --priority=1
|
||||||
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
||||||
- choco install 7zip -y
|
- choco install 7zip -y
|
||||||
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||||
|
@ -203,6 +212,8 @@ Windows_Ninja_CS_RelWithDebInfo:
|
||||||
Get-ChildItem -Recurse *.pdb | Remove-Item
|
Get-ChildItem -Recurse *.pdb | Remove-Item
|
||||||
}
|
}
|
||||||
- 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*'
|
- 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*'
|
||||||
|
after_script:
|
||||||
|
- Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log
|
||||||
cache:
|
cache:
|
||||||
key: msbuild-v2
|
key: msbuild-v2
|
||||||
paths:
|
paths:
|
||||||
|
@ -263,3 +274,35 @@ Windows_MSBuild_CS_RelWithDebInfo:
|
||||||
variables:
|
variables:
|
||||||
<<: *cs-targets
|
<<: *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/
|
||||||
|
|
43
.travis.yml
43
.travis.yml
|
@ -2,19 +2,12 @@ language: cpp
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- coverity_scan
|
|
||||||
- /openmw-.*$/
|
- /openmw-.*$/
|
||||||
env:
|
|
||||||
global:
|
|
||||||
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
|
|
||||||
# via the "travis encrypt" command using the project repo's public key
|
|
||||||
- secure: "jybGzAdUbqt9vWR/GEnRd96BgAi/7Zd1+2HK68j/i/8+/1YH2XxLOy4Jv/DUBhBlJIkxs/Xv8dRcUlFOclZDHX1d/9Qnsqd3oUVkD7k1y7cTOWy9TBQaE/v/kZo3LpzA3xPwwthrb0BvqIbOfIELi5fS5s8ba85WFRg3AX70wWE="
|
|
||||||
cache: ccache
|
cache: ccache
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- sourceline: 'ppa:openmw/openmw'
|
- sourceline: 'ppa:openmw/openmw'
|
||||||
# - ubuntu-toolchain-r-test # for GCC-10
|
|
||||||
packages: [
|
packages: [
|
||||||
# Dev
|
# Dev
|
||||||
build-essential, cmake, clang-tools, ccache,
|
build-essential, cmake, clang-tools, ccache,
|
||||||
|
@ -23,32 +16,21 @@ addons:
|
||||||
# FFmpeg
|
# FFmpeg
|
||||||
libavcodec-dev, libavformat-dev, libavutil-dev, libswresample-dev, libswscale-dev,
|
libavcodec-dev, libavformat-dev, libavutil-dev, libswresample-dev, libswscale-dev,
|
||||||
# Audio, Video and Misc. deps
|
# 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
|
# The other ones from OpenMW ppa
|
||||||
libbullet-dev, libopenscenegraph-dev, libmygui-dev
|
libbullet-dev, libopenscenegraph-dev, libmygui-dev
|
||||||
]
|
]
|
||||||
coverity_scan: # TODO: currently takes too long, disabled openmw/openmw-cs for now.
|
|
||||||
project:
|
|
||||||
name: "OpenMW/openmw"
|
|
||||||
description: "<Your project description here>"
|
|
||||||
branch_pattern: coverity_scan
|
|
||||||
notification_email: 1122069+psi29a@users.noreply.github.com
|
|
||||||
build_command_prepend: "cov-configure --comptype gcc --compiler gcc-5 --template; cmake . -DBUILD_OPENMW=FALSE -DBUILD_OPENCS=FALSE"
|
|
||||||
build_command: "make VERBOSE=1 -j3"
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: OpenMW (all) on MacOS 10.15 with Xcode 11.6
|
- name: OpenMW (all) on MacOS 10.15 with Xcode 11.6
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode11.6
|
osx_image: xcode11.6
|
||||||
if: branch != coverity_scan
|
|
||||||
- name: OpenMW (all) on Ubuntu Focal with GCC
|
- name: OpenMW (all) on Ubuntu Focal with GCC
|
||||||
os: linux
|
os: linux
|
||||||
dist: focal
|
dist: focal
|
||||||
if: branch != coverity_scan
|
|
||||||
- name: OpenMW (tests only) on Ubuntu Focal with GCC
|
- name: OpenMW (tests only) on Ubuntu Focal with GCC
|
||||||
os: linux
|
os: linux
|
||||||
dist: focal
|
dist: focal
|
||||||
if: branch != coverity_scan
|
|
||||||
env:
|
env:
|
||||||
- BUILD_TESTS_ONLY: 1
|
- BUILD_TESTS_ONLY: 1
|
||||||
- name: OpenMW (openmw) on Ubuntu Focal with Clang's Static Analysis
|
- name: OpenMW (openmw) on Ubuntu Focal with Clang's Static Analysis
|
||||||
|
@ -57,30 +39,21 @@ matrix:
|
||||||
env:
|
env:
|
||||||
- MATRIX_EVAL="CC=clang && CXX=clang++"
|
- MATRIX_EVAL="CC=clang && CXX=clang++"
|
||||||
- ANALYZE="scan-build --force-analyze-debug-code --use-cc clang --use-c++ clang++"
|
- ANALYZE="scan-build --force-analyze-debug-code --use-cc clang --use-c++ clang++"
|
||||||
if: branch != coverity_scan
|
|
||||||
compiler: clang
|
compiler: clang
|
||||||
- name: OpenMW Components Coverity Scan
|
|
||||||
os: linux
|
|
||||||
dist: focal
|
|
||||||
if: branch = coverity_scan
|
|
||||||
# allow_failures:
|
|
||||||
# - name: OpenMW (openmw) on Ubuntu Focal with GCC-10
|
|
||||||
# env:
|
|
||||||
# - MATRIX_EVAL="CC=gcc-10 && CXX=g++-10"
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then eval "${MATRIX_EVAL}"; fi
|
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then eval "${MATRIX_EVAL}"; fi
|
||||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./CI/before_install.${TRAVIS_OS_NAME}.sh; fi
|
- ./CI/before_install.${TRAVIS_OS_NAME}.sh
|
||||||
before_script:
|
before_script:
|
||||||
- ccache -z
|
- ccache -z
|
||||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./CI/before_script.${TRAVIS_OS_NAME}.sh; fi
|
- ./CI/before_script.${TRAVIS_OS_NAME}.sh
|
||||||
script:
|
script:
|
||||||
- cd ./build
|
- cd ./build
|
||||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ${ANALYZE} make -j3; fi
|
- ${ANALYZE} make -j3;
|
||||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ] && [ "${TRAVIS_OS_NAME}" = "osx" ]; then make package; fi
|
- if [ "${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 [ "${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 [ "${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
|
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then cd .. && ./CI/check_tabs.sh; fi
|
||||||
- cd "${TRAVIS_BUILD_DIR}"
|
- cd "${TRAVIS_BUILD_DIR}"
|
||||||
- ccache -s
|
- ccache -s
|
||||||
deploy:
|
deploy:
|
||||||
|
|
|
@ -96,6 +96,7 @@ Programmers
|
||||||
Jan Borsodi (am0s)
|
Jan Borsodi (am0s)
|
||||||
Jason Hooks (jhooks)
|
Jason Hooks (jhooks)
|
||||||
jeaye
|
jeaye
|
||||||
|
jefetienne
|
||||||
Jeffrey Haines (Jyby)
|
Jeffrey Haines (Jyby)
|
||||||
Jengerer
|
Jengerer
|
||||||
Jiří Kuneš (kunesj)
|
Jiří Kuneš (kunesj)
|
||||||
|
|
26
CHANGELOG.md
26
CHANGELOG.md
|
@ -5,10 +5,17 @@
|
||||||
Bug #1952: Incorrect particle lighting
|
Bug #1952: Incorrect particle lighting
|
||||||
Bug #2069: Fireflies in Fireflies invade Morrowind look wrong
|
Bug #2069: Fireflies in Fireflies invade Morrowind look wrong
|
||||||
Bug #2311: Targeted scripts are not properly supported on non-unique RefIDs
|
Bug #2311: Targeted scripts are not properly supported on non-unique RefIDs
|
||||||
|
Bug #2473: Unable to overstock merchants
|
||||||
|
Bug #2798: Mutable ESM records
|
||||||
|
Bug #2976 [reopened]: Issues combining settings from the command line and both config files
|
||||||
Bug #3676: NiParticleColorModifier isn't applied properly
|
Bug #3676: NiParticleColorModifier isn't applied properly
|
||||||
Bug #3714: Savegame fails to load due to conflict between SpellState and MagicEffects
|
Bug #3714: Savegame fails to load due to conflict between SpellState and MagicEffects
|
||||||
|
Bug #3789: Crash in visitEffectSources while in battle
|
||||||
|
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 #4021: Attributes and skills are not stored as floats
|
||||||
Bug #4055: Local scripts don't inherit variables from their base record
|
Bug #4055: Local scripts don't inherit variables from their base record
|
||||||
|
Bug #4083: Door animation freezes when colliding with actors
|
||||||
Bug #4623: Corprus implementation is incorrect
|
Bug #4623: Corprus implementation is incorrect
|
||||||
Bug #4631: Setting MSAA level too high doesn't fall back to highest supported level
|
Bug #4631: Setting MSAA level too high doesn't fall back to highest supported level
|
||||||
Bug #4764: Data race in osg ParticleSystem
|
Bug #4764: Data race in osg ParticleSystem
|
||||||
|
@ -29,6 +36,7 @@
|
||||||
Bug #5403: Enchantment effect doesn't show on an enemy during death animation
|
Bug #5403: Enchantment effect doesn't show on an enemy during death animation
|
||||||
Bug #5415: Environment maps in ebony cuirass and HiRez Armors Indoril cuirass don't work
|
Bug #5415: Environment maps in ebony cuirass and HiRez Armors Indoril cuirass don't work
|
||||||
Bug #5416: Junk non-node records before the root node are not handled gracefully
|
Bug #5416: Junk non-node records before the root node are not handled gracefully
|
||||||
|
Bug #5422: The player loses all spells when resurrected
|
||||||
Bug #5424: Creatures do not headtrack player
|
Bug #5424: Creatures do not headtrack player
|
||||||
Bug #5425: Poison effect only appears for one frame
|
Bug #5425: Poison effect only appears for one frame
|
||||||
Bug #5427: GetDistance unknown ID error is misleading
|
Bug #5427: GetDistance unknown ID error is misleading
|
||||||
|
@ -50,21 +58,39 @@
|
||||||
Bug #5557: Diagonal movement is noticeably slower with analogue stick
|
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 #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 #5603: Setting constant effect cast style doesn't correct effects view
|
||||||
|
Bug #5604: Only one valid NIF root node is loaded from a single file
|
||||||
Bug #5611: Usable items with "0 Uses" should be used only once
|
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 #5633: Damage Spells in effect before god mode is enabled continue to hurt the player character and can kill them
|
||||||
|
Bug #5639: Tooltips cover Messageboxes
|
||||||
|
Bug #5644: Summon effects running on the player during game initialization cause crashes
|
||||||
|
Bug #5656: Sneaking characters block hits while standing
|
||||||
|
Bug #5661: Region sounds don't play at the right interval
|
||||||
|
Bug #5688: Water shader broken indoors with enable indoor shadows = false
|
||||||
|
Bug #5703: OpenMW-CS menu system crashing on XFCE
|
||||||
Feature #390: 3rd person look "over the shoulder"
|
Feature #390: 3rd person look "over the shoulder"
|
||||||
Feature #2386: Distant Statics in the form of Object Paging
|
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 #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 #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 #5362: Show the soul gems' trapped soul in count dialog
|
||||||
Feature #5445: Handle NiLines
|
Feature #5445: Handle NiLines
|
||||||
|
Feature #5456: Basic collada animation support
|
||||||
Feature #5457: Realistic diagonal movement
|
Feature #5457: Realistic diagonal movement
|
||||||
Feature #5486: Fixes trainers to choose their training skills based on their base skill points
|
Feature #5486: Fixes trainers to choose their training skills based on their base skill points
|
||||||
Feature #5519: Code Patch tab in launcher
|
Feature #5519: Code Patch tab in launcher
|
||||||
Feature #5524: Resume failed script execution after reload
|
Feature #5524: Resume failed script execution after reload
|
||||||
Feature #5525: Search fields tweaks (utf-8)
|
Feature #5525: Search fields tweaks (utf-8)
|
||||||
Feature #5545: Option to allow stealing from an unconscious NPC during combat
|
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 #5579: MCP SetAngle enhancement
|
||||||
|
Feature #5580: Service refusal filtering
|
||||||
Feature #5610: Actors movement should be smoother
|
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
|
||||||
|
Feature #5672: Make stretch menu background configuration more accessible
|
||||||
|
Feature #5692: Improve spell/magic item search to factor in magic effect names
|
||||||
Task #5480: Drop Qt4 support
|
Task #5480: Drop Qt4 support
|
||||||
Task #5520: Improve cell name autocompleter implementation
|
Task #5520: Improve cell name autocompleter implementation
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ Known Issues:
|
||||||
|
|
||||||
New Features:
|
New Features:
|
||||||
- Dialogue to split item stacks now displays the name of the trapped soul for stacks of soul gems (#5362)
|
- Dialogue to split item stacks now displays the name of the trapped soul for stacks of soul gems (#5362)
|
||||||
|
- Basics of Collada animations are now supported via osgAnimation plugin (#5456)
|
||||||
|
|
||||||
New Editor Features:
|
New Editor Features:
|
||||||
- ?
|
- ?
|
||||||
|
@ -34,6 +35,7 @@ Bug Fixes:
|
||||||
|
|
||||||
Editor Bug Fixes:
|
Editor Bug Fixes:
|
||||||
- Verifier no longer checks for alleged 'race' entries in clothing body parts (#5400)
|
- Verifier no longer checks for alleged 'race' entries in clothing body parts (#5400)
|
||||||
|
- Flicker and crashing on XFCE4 fixed (#5703)
|
||||||
|
|
||||||
Miscellaneous:
|
Miscellaneous:
|
||||||
- Prevent save-game bloating by using an appropriate fog texture format (#5108)
|
- Prevent save-game bloating by using an appropriate fog texture format (#5108)
|
||||||
|
|
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,9 @@
|
||||||
#!/bin/sh -e
|
#!/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
|
||||||
|
|
||||||
curl -fSL -R -J https://downloads.openmw.org/osx/dependencies/openmw-deps-ef2462c.zip -o ~/openmw-deps.zip
|
curl -fSL -R -J https://downloads.openmw.org/osx/dependencies/openmw-deps-f8918dd.zip -o ~/openmw-deps.zip
|
||||||
unzip -o ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null
|
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" \
|
||||||
|
..
|
|
@ -571,6 +571,11 @@ if [ -z $SKIP_DOWNLOAD ]; then
|
||||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/SDL2-2.0.12.zip" \
|
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/SDL2-2.0.12.zip" \
|
||||||
"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
|
# Google test and mock
|
||||||
if [ ! -z $TEST_FRAMEWORK ]; then
|
if [ ! -z $TEST_FRAMEWORK ]; then
|
||||||
echo "Google test 1.10.0..."
|
echo "Google test 1.10.0..."
|
||||||
|
@ -901,6 +906,31 @@ printf "SDL 2.0.12... "
|
||||||
}
|
}
|
||||||
cd $DEPS
|
cd $DEPS
|
||||||
echo
|
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$(real_pwd)/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
|
||||||
|
echo
|
||||||
# Google Test and Google Mock
|
# Google Test and Google Mock
|
||||||
if [ ! -z $TEST_FRAMEWORK ]; then
|
if [ ! -z $TEST_FRAMEWORK ]; then
|
||||||
printf "Google test 1.10.0 ..."
|
printf "Google test 1.10.0 ..."
|
||||||
|
|
|
@ -13,10 +13,10 @@ cmake \
|
||||||
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \
|
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \
|
||||||
-D CMAKE_C_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE" \
|
-D CMAKE_C_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE" \
|
||||||
-D CMAKE_CXX_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_C_FLAGS_RELEASE="-g -O0" \
|
||||||
-D CMAKE_CXX_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 CMAKE_BUILD_TYPE=RELEASE \
|
||||||
-D OPENMW_OSX_DEPLOYMENT=TRUE \
|
-D OPENMW_OSX_DEPLOYMENT=TRUE \
|
||||||
-D BUILD_OPENMW=TRUE \
|
-D BUILD_OPENMW=TRUE \
|
||||||
|
@ -25,5 +25,6 @@ cmake \
|
||||||
-D BUILD_BSATOOL=TRUE \
|
-D BUILD_BSATOOL=TRUE \
|
||||||
-D BUILD_ESSIMPORTER=TRUE \
|
-D BUILD_ESSIMPORTER=TRUE \
|
||||||
-D BUILD_NIFTEST=TRUE \
|
-D BUILD_NIFTEST=TRUE \
|
||||||
|
-D BULLET_USE_DOUBLES=TRUE \
|
||||||
-G"Unix Makefiles" \
|
-G"Unix Makefiles" \
|
||||||
..
|
..
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
project(OpenMW)
|
project(OpenMW)
|
||||||
cmake_minimum_required(VERSION 3.1.0)
|
cmake_minimum_required(VERSION 3.1.0)
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
# for link time optimization, remove if cmake version is >= 3.9
|
# for link time optimization, remove if cmake version is >= 3.9
|
||||||
if(POLICY CMP0069)
|
if(POLICY CMP0069)
|
||||||
|
@ -152,6 +154,8 @@ endif()
|
||||||
# Dependencies
|
# Dependencies
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
||||||
|
find_package(LZ4 REQUIRED)
|
||||||
|
|
||||||
if (USE_QT)
|
if (USE_QT)
|
||||||
find_package(Qt5Core 5.12 REQUIRED)
|
find_package(Qt5Core 5.12 REQUIRED)
|
||||||
find_package(Qt5Widgets REQUIRED)
|
find_package(Qt5Widgets REQUIRED)
|
||||||
|
@ -255,7 +259,7 @@ if(NOT HAVE_STDINT_H)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
find_package(OpenSceneGraph 3.3.4 REQUIRED osgDB osgViewer osgText osgGA osgParticle osgUtil osgFX osgShadow)
|
find_package(OpenSceneGraph 3.3.4 REQUIRED osgDB osgViewer osgText osgGA osgParticle osgUtil osgFX osgShadow osgAnimation)
|
||||||
include_directories(SYSTEM ${OPENSCENEGRAPH_INCLUDE_DIRS})
|
include_directories(SYSTEM ${OPENSCENEGRAPH_INCLUDE_DIRS})
|
||||||
|
|
||||||
set(USED_OSG_PLUGINS
|
set(USED_OSG_PLUGINS
|
||||||
|
@ -304,7 +308,7 @@ endif()
|
||||||
|
|
||||||
set(Boost_NO_BOOST_CMAKE ON)
|
set(Boost_NO_BOOST_CMAKE ON)
|
||||||
|
|
||||||
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
find_package(Boost 1.6.2 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||||
find_package(MyGUI 3.2.2 REQUIRED)
|
find_package(MyGUI 3.2.2 REQUIRED)
|
||||||
find_package(SDL2 2.0.9 REQUIRED)
|
find_package(SDL2 2.0.9 REQUIRED)
|
||||||
find_package(OpenAL REQUIRED)
|
find_package(OpenAL REQUIRED)
|
||||||
|
@ -391,9 +395,6 @@ if (NOT WIN32 AND NOT APPLE)
|
||||||
"${OpenMW_BINARY_DIR}/org.openmw.cs.desktop")
|
"${OpenMW_BINARY_DIR}/org.openmw.cs.desktop")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# CXX Compiler settings
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
|
||||||
|
|
||||||
if(OPENMW_LTO_BUILD)
|
if(OPENMW_LTO_BUILD)
|
||||||
if(NOT CMAKE_VERSION VERSION_LESS 3.9)
|
if(NOT CMAKE_VERSION VERSION_LESS 3.9)
|
||||||
include(CheckIPOSupported)
|
include(CheckIPOSupported)
|
||||||
|
@ -414,7 +415,7 @@ endif()
|
||||||
|
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
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 )
|
add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON )
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
@ -431,6 +432,10 @@ 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)
|
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")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-parameter")
|
||||||
endif()
|
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)
|
elseif (MSVC)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE")
|
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)
|
endif (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||||
|
@ -586,6 +591,10 @@ if (WIN32)
|
||||||
|
|
||||||
set_target_properties(components PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
set_target_properties(components PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
||||||
set_target_properties(osg-ffmpeg-videoplayer 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)
|
if (BUILD_BSATOOL)
|
||||||
set_target_properties(bsatool PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
set_target_properties(bsatool PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
||||||
|
@ -829,7 +838,11 @@ elseif(NOT APPLE)
|
||||||
|
|
||||||
# Install binaries
|
# Install binaries
|
||||||
IF(BUILD_OPENMW)
|
IF(BUILD_OPENMW)
|
||||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/openmw" DESTINATION "${BINDIR}" )
|
IF(ANDROID)
|
||||||
|
INSTALL(PROGRAMS "${INSTALL_SOURCE}/libopenmw.so" DESTINATION "${BINDIR}" )
|
||||||
|
ELSE(ANDROID)
|
||||||
|
INSTALL(PROGRAMS "${INSTALL_SOURCE}/openmw" DESTINATION "${BINDIR}" )
|
||||||
|
ENDIF(ANDROID)
|
||||||
ENDIF(BUILD_OPENMW)
|
ENDIF(BUILD_OPENMW)
|
||||||
IF(BUILD_LAUNCHER)
|
IF(BUILD_LAUNCHER)
|
||||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/openmw-launcher" DESTINATION "${BINDIR}" )
|
INSTALL(PROGRAMS "${INSTALL_SOURCE}/openmw-launcher" DESTINATION "${BINDIR}" )
|
||||||
|
@ -882,7 +895,7 @@ elseif(NOT APPLE)
|
||||||
INSTALL(DIRECTORY "${INSTALL_SOURCE}/resources" DESTINATION "${DATADIR}" COMPONENT "Resources")
|
INSTALL(DIRECTORY "${INSTALL_SOURCE}/resources" DESTINATION "${DATADIR}" COMPONENT "Resources")
|
||||||
INSTALL(DIRECTORY DESTINATION "${DATADIR}/data" COMPONENT "Resources")
|
INSTALL(DIRECTORY DESTINATION "${DATADIR}/data" COMPONENT "Resources")
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
endif(NOT APPLE)
|
endif(OPENMW_OSX_DEPLOYMENT AND APPLE)
|
||||||
|
|
||||||
# Doxygen Target -- simply run 'make doc' or 'make doc_pages'
|
# Doxygen Target -- simply run 'make doc' or 'make doc_pages'
|
||||||
# output directory for 'make doc' is "${OpenMW_BINARY_DIR}/docs/Doxygen"
|
# output directory for 'make doc' is "${OpenMW_BINARY_DIR}/docs/Doxygen"
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
#include <boost/filesystem/fstream.hpp>
|
#include <boost/filesystem/fstream.hpp>
|
||||||
|
|
||||||
#include <components/bsa/bsa_file.hpp>
|
#include <components/bsa/compressedbsafile.hpp>
|
||||||
|
#include <components/misc/stringops.hpp>
|
||||||
|
|
||||||
#define BSATOOL_VERSION 1.1
|
#define BSATOOL_VERSION 1.1
|
||||||
|
|
||||||
|
@ -25,16 +26,6 @@ struct Arguments
|
||||||
bool fullpath;
|
bool fullpath;
|
||||||
};
|
};
|
||||||
|
|
||||||
void replaceAll(std::string& str, const std::string& needle, const std::string& substitute)
|
|
||||||
{
|
|
||||||
size_t pos = str.find(needle);
|
|
||||||
while(pos != std::string::npos)
|
|
||||||
{
|
|
||||||
str.replace(pos, needle.size(), substitute);
|
|
||||||
pos = str.find(needle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool parseOptions (int argc, char** argv, Arguments &info)
|
bool parseOptions (int argc, char** argv, Arguments &info)
|
||||||
{
|
{
|
||||||
bpo::options_description desc("Inspect and extract files from Bethesda BSA archives\n\n"
|
bpo::options_description desc("Inspect and extract files from Bethesda BSA archives\n\n"
|
||||||
|
@ -144,9 +135,9 @@ bool parseOptions (int argc, char** argv, Arguments &info)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int list(Bsa::BSAFile& bsa, Arguments& info);
|
int list(std::unique_ptr<Bsa::BSAFile>& bsa, Arguments& info);
|
||||||
int extract(Bsa::BSAFile& bsa, Arguments& info);
|
int extract(std::unique_ptr<Bsa::BSAFile>& bsa, Arguments& info);
|
||||||
int extractAll(Bsa::BSAFile& bsa, Arguments& info);
|
int extractAll(std::unique_ptr<Bsa::BSAFile>& bsa, Arguments& info);
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
@ -157,8 +148,16 @@ int main(int argc, char** argv)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// Open file
|
// Open file
|
||||||
Bsa::BSAFile bsa;
|
std::unique_ptr<Bsa::BSAFile> bsa;
|
||||||
bsa.open(info.filename);
|
|
||||||
|
Bsa::BsaVersion bsaVersion = Bsa::CompressedBSAFile::detectVersion(info.filename);
|
||||||
|
|
||||||
|
if (bsaVersion == Bsa::BSAVER_COMPRESSED)
|
||||||
|
bsa = std::make_unique<Bsa::CompressedBSAFile>(Bsa::CompressedBSAFile());
|
||||||
|
else
|
||||||
|
bsa = std::make_unique<Bsa::BSAFile>(Bsa::BSAFile());
|
||||||
|
|
||||||
|
bsa->open(info.filename);
|
||||||
|
|
||||||
if (info.mode == "list")
|
if (info.mode == "list")
|
||||||
return list(bsa, info);
|
return list(bsa, info);
|
||||||
|
@ -179,10 +178,10 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int list(Bsa::BSAFile& bsa, Arguments& info)
|
int list(std::unique_ptr<Bsa::BSAFile>& bsa, Arguments& info)
|
||||||
{
|
{
|
||||||
// List all files
|
// List all files
|
||||||
const Bsa::BSAFile::FileList &files = bsa.getList();
|
const Bsa::BSAFile::FileList &files = bsa->getList();
|
||||||
for (const auto& file : files)
|
for (const auto& file : files)
|
||||||
{
|
{
|
||||||
if(info.longformat)
|
if(info.longformat)
|
||||||
|
@ -201,15 +200,15 @@ int list(Bsa::BSAFile& bsa, Arguments& info)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int extract(Bsa::BSAFile& bsa, Arguments& info)
|
int extract(std::unique_ptr<Bsa::BSAFile>& bsa, Arguments& info)
|
||||||
{
|
{
|
||||||
std::string archivePath = info.extractfile;
|
std::string archivePath = info.extractfile;
|
||||||
replaceAll(archivePath, "/", "\\");
|
Misc::StringUtils::replaceAll(archivePath, "/", "\\");
|
||||||
|
|
||||||
std::string extractPath = info.extractfile;
|
std::string extractPath = info.extractfile;
|
||||||
replaceAll(extractPath, "\\", "/");
|
Misc::StringUtils::replaceAll(extractPath, "\\", "/");
|
||||||
|
|
||||||
if (!bsa.exists(archivePath.c_str()))
|
if (!bsa->exists(archivePath.c_str()))
|
||||||
{
|
{
|
||||||
std::cout << "ERROR: file '" << archivePath << "' not found\n";
|
std::cout << "ERROR: file '" << archivePath << "' not found\n";
|
||||||
std::cout << "In archive: " << info.filename << std::endl;
|
std::cout << "In archive: " << info.filename << std::endl;
|
||||||
|
@ -237,7 +236,7 @@ int extract(Bsa::BSAFile& bsa, Arguments& info)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a stream for the file to extract
|
// Get a stream for the file to extract
|
||||||
Files::IStreamPtr stream = bsa.getFile(archivePath.c_str());
|
Files::IStreamPtr stream = bsa->getFile(archivePath.c_str());
|
||||||
|
|
||||||
bfs::ofstream out(target, std::ios::binary);
|
bfs::ofstream out(target, std::ios::binary);
|
||||||
|
|
||||||
|
@ -250,12 +249,12 @@ int extract(Bsa::BSAFile& bsa, Arguments& info)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int extractAll(Bsa::BSAFile& bsa, Arguments& info)
|
int extractAll(std::unique_ptr<Bsa::BSAFile>& bsa, Arguments& info)
|
||||||
{
|
{
|
||||||
for (const auto &file : bsa.getList())
|
for (const auto &file : bsa->getList())
|
||||||
{
|
{
|
||||||
std::string extractPath(file.name);
|
std::string extractPath(file.name);
|
||||||
replaceAll(extractPath, "\\", "/");
|
Misc::StringUtils::replaceAll(extractPath, "\\", "/");
|
||||||
|
|
||||||
// Get the target path (the path the file will be extracted to)
|
// Get the target path (the path the file will be extracted to)
|
||||||
bfs::path target (info.outdir);
|
bfs::path target (info.outdir);
|
||||||
|
@ -273,7 +272,7 @@ int extractAll(Bsa::BSAFile& bsa, Arguments& info)
|
||||||
|
|
||||||
// Get a stream for the file to extract
|
// Get a stream for the file to extract
|
||||||
// (inefficient because getFile iter on the list again)
|
// (inefficient because getFile iter on the list again)
|
||||||
Files::IStreamPtr data = bsa.getFile(file.name);
|
Files::IStreamPtr data = bsa->getFile(file.name);
|
||||||
bfs::ofstream out(target, std::ios::binary);
|
bfs::ofstream out(target, std::ios::binary);
|
||||||
|
|
||||||
// Write the file to disk
|
// Write the file to disk
|
||||||
|
|
|
@ -94,6 +94,9 @@ bool Launcher::AdvancedPage::loadSettings()
|
||||||
unarmedFactorsStrengthComboBox->setCurrentIndex(unarmedFactorsStrengthIndex);
|
unarmedFactorsStrengthComboBox->setCurrentIndex(unarmedFactorsStrengthIndex);
|
||||||
loadSettingBool(stealingFromKnockedOutCheckBox, "always allow stealing from knocked out actors", "Game");
|
loadSettingBool(stealingFromKnockedOutCheckBox, "always allow stealing from knocked out actors", "Game");
|
||||||
loadSettingBool(enableNavigatorCheckBox, "enable", "Navigator");
|
loadSettingBool(enableNavigatorCheckBox, "enable", "Navigator");
|
||||||
|
int numPhysicsThreads = mEngineSettings.getInt("async num threads", "Physics");
|
||||||
|
if (numPhysicsThreads >= 0)
|
||||||
|
physicsThreadsSpinBox->setValue(numPhysicsThreads);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Visuals
|
// Visuals
|
||||||
|
@ -133,6 +136,7 @@ bool Launcher::AdvancedPage::loadSettings()
|
||||||
loadSettingBool(autoSwitchShoulderCheckBox, "auto switch shoulder", "Camera");
|
loadSettingBool(autoSwitchShoulderCheckBox, "auto switch shoulder", "Camera");
|
||||||
loadSettingBool(previewIfStandStillCheckBox, "preview if stand still", "Camera");
|
loadSettingBool(previewIfStandStillCheckBox, "preview if stand still", "Camera");
|
||||||
loadSettingBool(deferredPreviewRotationCheckBox, "deferred preview rotation", "Camera");
|
loadSettingBool(deferredPreviewRotationCheckBox, "deferred preview rotation", "Camera");
|
||||||
|
loadSettingBool(headBobbingCheckBox, "head bobbing", "Camera");
|
||||||
defaultShoulderComboBox->setCurrentIndex(
|
defaultShoulderComboBox->setCurrentIndex(
|
||||||
mEngineSettings.getVector2("view over shoulder offset", "Camera").x() >= 0 ? 0 : 1);
|
mEngineSettings.getVector2("view over shoulder offset", "Camera").x() >= 0 ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
@ -148,6 +152,7 @@ bool Launcher::AdvancedPage::loadSettings()
|
||||||
// Match the index with the option (only 0, 1, 2, or 3 are valid). Will default to 0 if invalid.
|
// 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)
|
if (showOwnedIndex >= 0 && showOwnedIndex <= 3)
|
||||||
showOwnedComboBox->setCurrentIndex(showOwnedIndex);
|
showOwnedComboBox->setCurrentIndex(showOwnedIndex);
|
||||||
|
loadSettingBool(stretchBackgroundCheckBox, "stretch menu background", "GUI");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bug fixes
|
// Bug fixes
|
||||||
|
@ -208,6 +213,9 @@ void Launcher::AdvancedPage::saveSettings()
|
||||||
mEngineSettings.setInt("strength influences hand to hand", "Game", unarmedFactorsStrengthIndex);
|
mEngineSettings.setInt("strength influences hand to hand", "Game", unarmedFactorsStrengthIndex);
|
||||||
saveSettingBool(stealingFromKnockedOutCheckBox, "always allow stealing from knocked out actors", "Game");
|
saveSettingBool(stealingFromKnockedOutCheckBox, "always allow stealing from knocked out actors", "Game");
|
||||||
saveSettingBool(enableNavigatorCheckBox, "enable", "Navigator");
|
saveSettingBool(enableNavigatorCheckBox, "enable", "Navigator");
|
||||||
|
int numPhysicsThreads = physicsThreadsSpinBox->value();
|
||||||
|
if (numPhysicsThreads != mEngineSettings.getInt("async num threads", "Physics"))
|
||||||
|
mEngineSettings.setInt("async num threads", "Physics", numPhysicsThreads);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Visuals
|
// Visuals
|
||||||
|
@ -247,6 +255,7 @@ void Launcher::AdvancedPage::saveSettings()
|
||||||
saveSettingBool(autoSwitchShoulderCheckBox, "auto switch shoulder", "Camera");
|
saveSettingBool(autoSwitchShoulderCheckBox, "auto switch shoulder", "Camera");
|
||||||
saveSettingBool(previewIfStandStillCheckBox, "preview if stand still", "Camera");
|
saveSettingBool(previewIfStandStillCheckBox, "preview if stand still", "Camera");
|
||||||
saveSettingBool(deferredPreviewRotationCheckBox, "deferred preview rotation", "Camera");
|
saveSettingBool(deferredPreviewRotationCheckBox, "deferred preview rotation", "Camera");
|
||||||
|
saveSettingBool(headBobbingCheckBox, "head bobbing", "Camera");
|
||||||
|
|
||||||
osg::Vec2f shoulderOffset = mEngineSettings.getVector2("view over shoulder offset", "Camera");
|
osg::Vec2f shoulderOffset = mEngineSettings.getVector2("view over shoulder offset", "Camera");
|
||||||
if (defaultShoulderComboBox->currentIndex() != (shoulderOffset.x() >= 0 ? 0 : 1))
|
if (defaultShoulderComboBox->currentIndex() != (shoulderOffset.x() >= 0 ? 0 : 1))
|
||||||
|
@ -269,6 +278,7 @@ void Launcher::AdvancedPage::saveSettings()
|
||||||
int showOwnedCurrentIndex = showOwnedComboBox->currentIndex();
|
int showOwnedCurrentIndex = showOwnedComboBox->currentIndex();
|
||||||
if (showOwnedCurrentIndex != mEngineSettings.getInt("show owned", "Game"))
|
if (showOwnedCurrentIndex != mEngineSettings.getInt("show owned", "Game"))
|
||||||
mEngineSettings.setInt("show owned", "Game", showOwnedCurrentIndex);
|
mEngineSettings.setInt("show owned", "Game", showOwnedCurrentIndex);
|
||||||
|
saveSettingBool(stretchBackgroundCheckBox, "stretch menu background", "GUI");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bug fixes
|
// Bug fixes
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace Launcher
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AdvancedPage(Files::ConfigurationManager &cfg, Config::GameSettings &gameSettings,
|
AdvancedPage(Files::ConfigurationManager &cfg, Config::GameSettings &gameSettings,
|
||||||
Settings::Manager &engineSettings, QWidget *parent = 0);
|
Settings::Manager &engineSettings, QWidget *parent = nullptr);
|
||||||
|
|
||||||
bool loadSettings();
|
bool loadSettings();
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace Launcher
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DataFilesPage (Files::ConfigurationManager &cfg, Config::GameSettings &gameSettings,
|
explicit DataFilesPage (Files::ConfigurationManager &cfg, Config::GameSettings &gameSettings,
|
||||||
Config::LauncherSettings &launcherSettings, QWidget *parent = 0);
|
Config::LauncherSettings &launcherSettings, QWidget *parent = nullptr);
|
||||||
|
|
||||||
QAbstractItemModel* profilesModel() const;
|
QAbstractItemModel* profilesModel() const;
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,13 @@
|
||||||
|
|
||||||
#include <SDL_video.h>
|
#include <SDL_video.h>
|
||||||
|
|
||||||
|
#include <numeric>
|
||||||
|
|
||||||
#include <components/files/configurationmanager.hpp>
|
#include <components/files/configurationmanager.hpp>
|
||||||
#include <components/misc/gcd.hpp>
|
|
||||||
|
|
||||||
QString getAspect(int x, int y)
|
QString getAspect(int x, int y)
|
||||||
{
|
{
|
||||||
int gcd = Misc::gcd (x, y);
|
int gcd = std::gcd (x, y);
|
||||||
int xaspect = x / gcd;
|
int xaspect = x / gcd;
|
||||||
int yaspect = y / gcd;
|
int yaspect = y / gcd;
|
||||||
// special case: 8 : 5 is usually referred to as 16:10
|
// special case: 8 : 5 is usually referred to as 16:10
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace Launcher
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GraphicsPage(Files::ConfigurationManager &cfg, Settings::Manager &engineSettings, QWidget *parent = 0);
|
GraphicsPage(Files::ConfigurationManager &cfg, Settings::Manager &engineSettings, QWidget *parent = nullptr);
|
||||||
|
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
bool loadSettings();
|
bool loadSettings();
|
||||||
|
|
|
@ -211,10 +211,10 @@ void Launcher::MainDialog::setVersionLabel()
|
||||||
versionLabel->setText(tr("OpenMW development (%1)").arg(revision.left(10)));
|
versionLabel->setText(tr("OpenMW development (%1)").arg(revision.left(10)));
|
||||||
|
|
||||||
// Add the compile date and time
|
// Add the compile date and time
|
||||||
versionLabel->setToolTip(tr("Compiled on %1 %2").arg(QLocale(QLocale::C).toDate(QString(__DATE__).simplified(),
|
auto compileDate = QLocale(QLocale::C).toDate(QString(__DATE__).simplified(), QLatin1String("MMM d yyyy"));
|
||||||
QLatin1String("MMM d yyyy")).toString(Qt::SystemLocaleLongDate),
|
auto compileTime = QLocale(QLocale::C).toTime(QString(__TIME__).simplified(), QLatin1String("hh:mm:ss"));
|
||||||
QLocale(QLocale::C).toTime(QString(__TIME__).simplified(),
|
versionLabel->setToolTip(tr("Compiled on %1 %2").arg(QLocale::system().toString(compileDate, QLocale::LongFormat),
|
||||||
QLatin1String("hh:mm:ss")).toString(Qt::SystemLocaleShortDate)));
|
QLocale::system().toString(compileTime, QLocale::ShortFormat)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Launcher::MainDialog::setup()
|
bool Launcher::MainDialog::setup()
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace Launcher
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MainDialog(QWidget *parent = 0);
|
explicit MainDialog(QWidget *parent = nullptr);
|
||||||
~MainDialog();
|
~MainDialog();
|
||||||
|
|
||||||
FirstRunDialogResult showFirstRunDialog();
|
FirstRunDialogResult showFirstRunDialog();
|
||||||
|
@ -84,7 +84,7 @@ namespace Launcher
|
||||||
inline bool startProgram(const QString &name, bool detached = false) { return startProgram(name, QStringList(), detached); }
|
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);
|
bool startProgram(const QString &name, const QStringList &arguments, bool detached = false);
|
||||||
|
|
||||||
void closeEvent(QCloseEvent *event);
|
void closeEvent(QCloseEvent *event) override;
|
||||||
|
|
||||||
PlayPage *mPlayPage;
|
PlayPage *mPlayPage;
|
||||||
GraphicsPage *mGraphicsPage;
|
GraphicsPage *mGraphicsPage;
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace Launcher
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PlayPage(QWidget *parent = 0);
|
PlayPage(QWidget *parent = nullptr);
|
||||||
void setProfilesModel(QAbstractItemModel *model);
|
void setProfilesModel(QAbstractItemModel *model);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace Launcher
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SettingsPage(Files::ConfigurationManager &cfg, Config::GameSettings &gameSettings,
|
SettingsPage(Files::ConfigurationManager &cfg, Config::GameSettings &gameSettings,
|
||||||
Config::LauncherSettings &launcherSettings, MainDialog *parent = 0);
|
Config::LauncherSettings &launcherSettings, MainDialog *parent = nullptr);
|
||||||
~SettingsPage();
|
~SettingsPage();
|
||||||
|
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
|
|
|
@ -24,10 +24,10 @@ class LineEdit : public QLineEdit
|
||||||
QString mPlaceholderText;
|
QString mPlaceholderText;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LineEdit(QWidget *parent = 0);
|
LineEdit(QWidget *parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *);
|
void resizeEvent(QResizeEvent *) override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateClearButton(const QString &text);
|
void updateClearButton(const QString &text);
|
||||||
|
|
|
@ -33,7 +33,7 @@ void ProfilesComboBox::setEditEnabled(bool editable)
|
||||||
ComboBoxLineEdit *edit = new ComboBoxLineEdit(this);
|
ComboBoxLineEdit *edit = new ComboBoxLineEdit(this);
|
||||||
|
|
||||||
setLineEdit(edit);
|
setLineEdit(edit);
|
||||||
setCompleter(0);
|
setCompleter(nullptr);
|
||||||
|
|
||||||
connect(lineEdit(), SIGNAL(editingFinished()), this,
|
connect(lineEdit(), SIGNAL(editingFinished()), this,
|
||||||
SLOT(slotEditingFinished()));
|
SLOT(slotEditingFinished()));
|
||||||
|
|
|
@ -16,12 +16,12 @@ public:
|
||||||
class ComboBoxLineEdit : public LineEdit
|
class ComboBoxLineEdit : public LineEdit
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ComboBoxLineEdit (QWidget *parent = 0);
|
explicit ComboBoxLineEdit (QWidget *parent = nullptr);
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit ProfilesComboBox(QWidget *parent = 0);
|
explicit ProfilesComboBox(QWidget *parent = nullptr);
|
||||||
void setEditEnabled(bool editable);
|
void setEditEnabled(bool editable);
|
||||||
void setCurrentProfile(int index)
|
void setCurrentProfile(int index)
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,7 @@ Launcher::TextInputDialog::TextInputDialog(const QString& title, const QString &
|
||||||
QValidator *validator = new QRegExpValidator(QRegExp("^[a-zA-Z0-9_]*$"), this); // Alpha-numeric + underscore
|
QValidator *validator = new QRegExpValidator(QRegExp("^[a-zA-Z0-9_]*$"), this); // Alpha-numeric + underscore
|
||||||
mLineEdit = new LineEdit(this);
|
mLineEdit = new LineEdit(this);
|
||||||
mLineEdit->setValidator(validator);
|
mLineEdit->setValidator(validator);
|
||||||
mLineEdit->setCompleter(0);
|
mLineEdit->setCompleter(nullptr);
|
||||||
|
|
||||||
QVBoxLayout *dialogLayout = new QVBoxLayout(this);
|
QVBoxLayout *dialogLayout = new QVBoxLayout(this);
|
||||||
dialogLayout->addWidget(label);
|
dialogLayout->addWidget(label);
|
||||||
|
|
|
@ -15,13 +15,13 @@ namespace Launcher
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit TextInputDialog(const QString& title, const QString &text, QWidget *parent = 0);
|
explicit TextInputDialog(const QString& title, const QString &text, QWidget *parent = nullptr);
|
||||||
~TextInputDialog ();
|
~TextInputDialog ();
|
||||||
|
|
||||||
inline LineEdit *lineEdit() { return mLineEdit; }
|
inline LineEdit *lineEdit() { return mLineEdit; }
|
||||||
void setOkButtonEnabled(bool enabled);
|
void setOkButtonEnabled(bool enabled);
|
||||||
|
|
||||||
int exec();
|
int exec() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -645,7 +645,7 @@ MwIniImporter::MwIniImporter()
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i=0; fallback[i]; i++) {
|
for(int i=0; fallback[i]; i++) {
|
||||||
mMergeFallback.push_back(fallback[i]);
|
mMergeFallback.emplace_back(fallback[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -910,7 +910,7 @@ void MwIniImporter::importGameFiles(multistrmap &cfg, const multistrmap &ini, co
|
||||||
std::time_t time = lastWriteTime(path, defaultTime);
|
std::time_t time = lastWriteTime(path, defaultTime);
|
||||||
if (time != defaultTime)
|
if (time != defaultTime)
|
||||||
{
|
{
|
||||||
contentFiles.push_back({time, path});
|
contentFiles.emplace_back(time, std::move(path));
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -985,14 +985,7 @@ std::time_t MwIniImporter::lastWriteTime(const boost::filesystem::path& filename
|
||||||
std::time_t writeTime(defaultTime);
|
std::time_t writeTime(defaultTime);
|
||||||
if (boost::filesystem::exists(filename))
|
if (boost::filesystem::exists(filename))
|
||||||
{
|
{
|
||||||
// FixMe: remove #if when Boost dependency for Linux builds updated
|
|
||||||
// This allows Linux to build until then
|
|
||||||
#if (BOOST_VERSION >= 104800)
|
|
||||||
// need to resolve any symlinks so that we get time of file, not symlink
|
|
||||||
boost::filesystem::path resolved = boost::filesystem::canonical(filename);
|
boost::filesystem::path resolved = boost::filesystem::canonical(filename);
|
||||||
#else
|
|
||||||
boost::filesystem::path resolved = filename;
|
|
||||||
#endif
|
|
||||||
writeTime = boost::filesystem::last_write_time(resolved);
|
writeTime = boost::filesystem::last_write_time(resolved);
|
||||||
|
|
||||||
// print timestamp
|
// print timestamp
|
||||||
|
|
|
@ -132,6 +132,7 @@ int main(int argc, char **argv)
|
||||||
if(!parseOptions (argc, argv, files))
|
if(!parseOptions (argc, argv, files))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
Nif::NIFFile::setLoadUnsupportedFiles(true);
|
||||||
// std::cout << "Reading Files" << std::endl;
|
// std::cout << "Reading Files" << std::endl;
|
||||||
for(std::vector<std::string>::const_iterator it=files.begin(); it!=files.end(); ++it)
|
for(std::vector<std::string>::const_iterator it=files.begin(); it!=files.end(); ++it)
|
||||||
{
|
{
|
||||||
|
|
|
@ -89,10 +89,10 @@ std::pair<Files::PathContainer, std::vector<std::string> > CS::Editor::readConfi
|
||||||
|
|
||||||
desc.add_options()
|
desc.add_options()
|
||||||
("data", boost::program_options::value<Files::EscapePathContainer>()->default_value(Files::EscapePathContainer(), "data")->multitoken()->composing())
|
("data", boost::program_options::value<Files::EscapePathContainer>()->default_value(Files::EscapePathContainer(), "data")->multitoken()->composing())
|
||||||
("data-local", boost::program_options::value<Files::EscapeHashString>()->default_value(""))
|
("data-local", boost::program_options::value<Files::EscapePath>()->default_value(Files::EscapePath(), ""))
|
||||||
("fs-strict", boost::program_options::value<bool>()->implicit_value(true)->default_value(false))
|
("fs-strict", boost::program_options::value<bool>()->implicit_value(true)->default_value(false))
|
||||||
("encoding", boost::program_options::value<Files::EscapeHashString>()->default_value("win1252"))
|
("encoding", boost::program_options::value<Files::EscapeHashString>()->default_value("win1252"))
|
||||||
("resources", boost::program_options::value<Files::EscapeHashString>()->default_value("resources"))
|
("resources", boost::program_options::value<Files::EscapePath>()->default_value(Files::EscapePath(), "resources"))
|
||||||
("fallback-archive", boost::program_options::value<Files::EscapeStringVector>()->
|
("fallback-archive", boost::program_options::value<Files::EscapeStringVector>()->
|
||||||
default_value(Files::EscapeStringVector(), "fallback-archive")->multitoken())
|
default_value(Files::EscapeStringVector(), "fallback-archive")->multitoken())
|
||||||
("fallback", boost::program_options::value<FallbackMap>()->default_value(FallbackMap(), "")
|
("fallback", boost::program_options::value<FallbackMap>()->default_value(FallbackMap(), "")
|
||||||
|
@ -112,7 +112,7 @@ std::pair<Files::PathContainer, std::vector<std::string> > CS::Editor::readConfi
|
||||||
mDocumentManager.setEncoding(ToUTF8::calculateEncoding(mEncodingName));
|
mDocumentManager.setEncoding(ToUTF8::calculateEncoding(mEncodingName));
|
||||||
mFileDialog.setEncoding (QString::fromUtf8(mEncodingName.c_str()));
|
mFileDialog.setEncoding (QString::fromUtf8(mEncodingName.c_str()));
|
||||||
|
|
||||||
mDocumentManager.setResourceDir (mResources = variables["resources"].as<Files::EscapeHashString>().toStdString());
|
mDocumentManager.setResourceDir (mResources = variables["resources"].as<Files::EscapePath>().mPath);
|
||||||
|
|
||||||
if (variables["script-blacklist-use"].as<bool>())
|
if (variables["script-blacklist-use"].as<bool>())
|
||||||
mDocumentManager.setBlacklistedScripts (
|
mDocumentManager.setBlacklistedScripts (
|
||||||
|
@ -125,14 +125,9 @@ std::pair<Files::PathContainer, std::vector<std::string> > CS::Editor::readConfi
|
||||||
dataDirs = Files::PathContainer(Files::EscapePath::toPathContainer(variables["data"].as<Files::EscapePathContainer>()));
|
dataDirs = Files::PathContainer(Files::EscapePath::toPathContainer(variables["data"].as<Files::EscapePathContainer>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string local = variables["data-local"].as<Files::EscapeHashString>().toStdString();
|
Files::PathContainer::value_type local(variables["data-local"].as<Files::EscapePath>().mPath);
|
||||||
if (!local.empty())
|
if (!local.empty())
|
||||||
{
|
dataLocal.push_back(local);
|
||||||
if (local.front() == '\"')
|
|
||||||
local = local.substr(1, local.length() - 2);
|
|
||||||
|
|
||||||
dataLocal.push_back(Files::PathContainer::value_type(local));
|
|
||||||
}
|
|
||||||
|
|
||||||
mCfgMgr.processPaths (dataDirs);
|
mCfgMgr.processPaths (dataDirs);
|
||||||
mCfgMgr.processPaths (dataLocal, true);
|
mCfgMgr.processPaths (dataLocal, true);
|
||||||
|
@ -229,7 +224,7 @@ void CS::Editor::openFiles (const boost::filesystem::path &savePath, const std::
|
||||||
if(discoveredFiles.empty())
|
if(discoveredFiles.empty())
|
||||||
{
|
{
|
||||||
for (const QString &path : mFileDialog.selectedFilePaths())
|
for (const QString &path : mFileDialog.selectedFilePaths())
|
||||||
files.push_back(path.toUtf8().constData());
|
files.emplace_back(path.toUtf8().constData());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -246,7 +241,7 @@ void CS::Editor::createNewFile (const boost::filesystem::path &savePath)
|
||||||
std::vector<boost::filesystem::path> files;
|
std::vector<boost::filesystem::path> files;
|
||||||
|
|
||||||
for (const QString &path : mFileDialog.selectedFilePaths()) {
|
for (const QString &path : mFileDialog.selectedFilePaths()) {
|
||||||
files.push_back(path.toUtf8().constData());
|
files.emplace_back(path.toUtf8().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
files.push_back (savePath);
|
files.push_back (savePath);
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Application : public QApplication
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
bool notify (QObject *receiver, QEvent *event)
|
bool notify (QObject *receiver, QEvent *event) override
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -47,9 +47,6 @@ int runApplication(int argc, char *argv[])
|
||||||
setenv("OSG_GL_TEXTURE_STORAGE", "OFF", 0);
|
setenv("OSG_GL_TEXTURE_STORAGE", "OFF", 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// To allow background thread drawing in OSG
|
|
||||||
QApplication::setAttribute(Qt::AA_X11InitThreads, true);
|
|
||||||
|
|
||||||
Q_INIT_RESOURCE (resources);
|
Q_INIT_RESOURCE (resources);
|
||||||
|
|
||||||
qRegisterMetaType<std::string> ("std::string");
|
qRegisterMetaType<std::string> ("std::string");
|
||||||
|
|
|
@ -127,7 +127,7 @@ void CSMDoc::Loader::load()
|
||||||
|
|
||||||
void CSMDoc::Loader::loadDocument (CSMDoc::Document *document)
|
void CSMDoc::Loader::loadDocument (CSMDoc::Document *document)
|
||||||
{
|
{
|
||||||
mDocuments.push_back (std::make_pair (document, Stage()));
|
mDocuments.emplace_back (document, Stage());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMDoc::Loader::abortLoading (CSMDoc::Document *document)
|
void CSMDoc::Loader::abortLoading (CSMDoc::Document *document)
|
||||||
|
|
|
@ -57,7 +57,7 @@ void CSMDoc::Operation::run()
|
||||||
|
|
||||||
void CSMDoc::Operation::appendStage (Stage *stage)
|
void CSMDoc::Operation::appendStage (Stage *stage)
|
||||||
{
|
{
|
||||||
mStages.push_back (std::make_pair (stage, 0));
|
mStages.emplace_back (stage, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMDoc::Operation::setDefaultSeverity (Message::Severity severity)
|
void CSMDoc::Operation::setDefaultSeverity (Message::Severity severity)
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace CSMDoc
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
OperationHolder (Operation *operation = 0);
|
OperationHolder (Operation *operation = nullptr);
|
||||||
|
|
||||||
void setOperation (Operation *operation);
|
void setOperation (Operation *operation);
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "operationholder.hpp"
|
#include "operationholder.hpp"
|
||||||
|
|
||||||
CSMDoc::Runner::Runner (const boost::filesystem::path& projectPath)
|
CSMDoc::Runner::Runner (const boost::filesystem::path& projectPath)
|
||||||
: mRunning (false), mStartup (0), mProjectPath (projectPath)
|
: mRunning (false), mStartup (nullptr), mProjectPath (projectPath)
|
||||||
{
|
{
|
||||||
connect (&mProcess, SIGNAL (finished (int, QProcess::ExitStatus)),
|
connect (&mProcess, SIGNAL (finished (int, QProcess::ExitStatus)),
|
||||||
this, SLOT (finished (int, QProcess::ExitStatus)));
|
this, SLOT (finished (int, QProcess::ExitStatus)));
|
||||||
|
@ -25,7 +25,7 @@ CSMDoc::Runner::~Runner()
|
||||||
{
|
{
|
||||||
if (mRunning)
|
if (mRunning)
|
||||||
{
|
{
|
||||||
disconnect (&mProcess, 0, this, 0);
|
disconnect (&mProcess, nullptr, this, nullptr);
|
||||||
mProcess.kill();
|
mProcess.kill();
|
||||||
mProcess.waitForFinished();
|
mProcess.waitForFinished();
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ void CSMDoc::Runner::start (bool delayed)
|
||||||
if (mStartup)
|
if (mStartup)
|
||||||
{
|
{
|
||||||
delete mStartup;
|
delete mStartup;
|
||||||
mStartup = 0;
|
mStartup = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!delayed)
|
if (!delayed)
|
||||||
|
@ -102,7 +102,7 @@ void CSMDoc::Runner::start (bool delayed)
|
||||||
void CSMDoc::Runner::stop()
|
void CSMDoc::Runner::stop()
|
||||||
{
|
{
|
||||||
delete mStartup;
|
delete mStartup;
|
||||||
mStartup = 0;
|
mStartup = nullptr;
|
||||||
|
|
||||||
if (mProcess.state()==QProcess::NotRunning)
|
if (mProcess.state()==QProcess::NotRunning)
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,10 +37,10 @@ namespace CSMDoc
|
||||||
OpenSaveStage (Document& document, SavingState& state, bool projectFile);
|
OpenSaveStage (Document& document, SavingState& state, bool projectFile);
|
||||||
///< \param projectFile Saving the project file instead of the content file.
|
///< \param projectFile Saving the project file instead of the content file.
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,10 +55,10 @@ namespace CSMDoc
|
||||||
WriteHeaderStage (Document& document, SavingState& state, bool simple);
|
WriteHeaderStage (Document& document, SavingState& state, bool simple);
|
||||||
///< \param simple Simplified header (used for project files).
|
///< \param simple Simplified header (used for project files).
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,10 +75,10 @@ namespace CSMDoc
|
||||||
WriteCollectionStage (const CollectionT& collection, SavingState& state,
|
WriteCollectionStage (const CollectionT& collection, SavingState& state,
|
||||||
CSMWorld::Scope scope = CSMWorld::Scope_Content);
|
CSMWorld::Scope scope = CSMWorld::Scope_Content);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -125,10 +125,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
WriteDialogueCollectionStage (Document& document, SavingState& state, bool journal);
|
WriteDialogueCollectionStage (Document& document, SavingState& state, bool journal);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -142,10 +142,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
WriteRefIdCollectionStage (Document& document, SavingState& state);
|
WriteRefIdCollectionStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -159,10 +159,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
CollectionReferencesStage (Document& document, SavingState& state);
|
CollectionReferencesStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -175,10 +175,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
WriteCellCollectionStage (Document& document, SavingState& state);
|
WriteCellCollectionStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -192,10 +192,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
WritePathgridCollectionStage (Document& document, SavingState& state);
|
WritePathgridCollectionStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -209,10 +209,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
WriteLandCollectionStage (Document& document, SavingState& state);
|
WriteLandCollectionStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -226,10 +226,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
WriteLandTextureCollectionStage (Document& document, SavingState& state);
|
WriteLandTextureCollectionStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -241,10 +241,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
CloseSaveStage (SavingState& state);
|
CloseSaveStage (SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -257,10 +257,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
FinalSavingStage (Document& document, SavingState& state);
|
FinalSavingStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< 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);
|
AndNode (const std::vector<std::shared_ptr<Node> >& nodes);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const override;
|
||||||
///< \return Can the specified table row pass through to filter?
|
///< \return Can the specified table row pass through to filter?
|
||||||
/// \param columns column ID to column index mapping
|
/// \param columns column ID to column index mapping
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,12 +13,12 @@ namespace CSMFilter
|
||||||
|
|
||||||
BooleanNode (bool true_);
|
BooleanNode (bool true_);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const override;
|
||||||
///< \return Can the specified table row pass through to filter?
|
///< \return Can the specified table row pass through to filter?
|
||||||
/// \param columns column ID to column index mapping
|
/// \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.
|
///< Return a string that represents this node.
|
||||||
///
|
///
|
||||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace CSMFilter
|
||||||
{
|
{
|
||||||
public:
|
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
|
///< 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.
|
/// passed into test as columns must contain all columns listed here.
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,11 +21,11 @@ namespace CSMFilter
|
||||||
|
|
||||||
const Node& operator[] (int index) const;
|
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
|
///< 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.
|
/// 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.
|
///< Return a string that represents this node.
|
||||||
///
|
///
|
||||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||||
|
|
|
@ -11,8 +11,8 @@ namespace CSMFilter
|
||||||
|
|
||||||
NotNode (std::shared_ptr<Node> child);
|
NotNode (std::shared_ptr<Node> child);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const override;
|
||||||
///< \return Can the specified table row pass through to filter?
|
///< \return Can the specified table row pass through to filter?
|
||||||
/// \param columns column ID to column index mapping
|
/// \param columns column ID to column index mapping
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,8 +11,8 @@ namespace CSMFilter
|
||||||
|
|
||||||
OrNode (const std::vector<std::shared_ptr<Node> >& nodes);
|
OrNode (const std::vector<std::shared_ptr<Node> >& nodes);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const override;
|
||||||
///< \return Can the specified table row pass through to filter?
|
///< \return Can the specified table row pass through to filter?
|
||||||
/// \param columns column ID to column index mapping
|
/// \param columns column ID to column index mapping
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,16 +14,16 @@ namespace CSMFilter
|
||||||
|
|
||||||
TextNode (int columnId, const std::string& text);
|
TextNode (int columnId, const std::string& text);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const override;
|
||||||
///< \return Can the specified table row pass through to filter?
|
///< \return Can the specified table row pass through to filter?
|
||||||
/// \param columns column ID to column index mapping
|
/// \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
|
///< 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.
|
/// 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.
|
///< Return a string that represents this node.
|
||||||
///
|
///
|
||||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||||
|
|
|
@ -18,11 +18,11 @@ namespace CSMFilter
|
||||||
|
|
||||||
Node& getChild();
|
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
|
///< 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.
|
/// 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.
|
///< Return a string that represents this node.
|
||||||
///
|
///
|
||||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
/// \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);
|
ValueNode (int columnId, Type lowerType, Type upperType, double lower, double upper);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const override;
|
||||||
///< \return Can the specified table row pass through to filter?
|
///< \return Can the specified table row pass through to filter?
|
||||||
/// \param columns column ID to column index mapping
|
/// \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
|
///< 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.
|
/// 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.
|
///< Return a string that represents this node.
|
||||||
///
|
///
|
||||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
CSMPrefs::BoolSetting::BoolSetting (Category *parent, Settings::Manager *values,
|
CSMPrefs::BoolSetting::BoolSetting (Category *parent, Settings::Manager *values,
|
||||||
QMutex *mutex, const std::string& key, const std::string& label, bool default_)
|
QMutex *mutex, const std::string& key, const std::string& label, bool default_)
|
||||||
: Setting (parent, values, mutex, key, label), mDefault (default_), mWidget(0)
|
: Setting (parent, values, mutex, key, label), mDefault (default_), mWidget(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CSMPrefs::BoolSetting& CSMPrefs::BoolSetting::setTooltip (const std::string& tooltip)
|
CSMPrefs::BoolSetting& CSMPrefs::BoolSetting::setTooltip (const std::string& tooltip)
|
||||||
|
@ -33,7 +33,7 @@ std::pair<QWidget *, QWidget *> CSMPrefs::BoolSetting::makeWidgets (QWidget *par
|
||||||
|
|
||||||
connect (mWidget, SIGNAL (stateChanged (int)), this, SLOT (valueChanged (int)));
|
connect (mWidget, SIGNAL (stateChanged (int)), this, SLOT (valueChanged (int)));
|
||||||
|
|
||||||
return std::make_pair (static_cast<QWidget *> (0), mWidget);
|
return std::make_pair (static_cast<QWidget *> (nullptr), mWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMPrefs::BoolSetting::updateWidget()
|
void CSMPrefs::BoolSetting::updateWidget()
|
||||||
|
|
|
@ -23,9 +23,9 @@ namespace CSMPrefs
|
||||||
BoolSetting& setTooltip (const std::string& tooltip);
|
BoolSetting& setTooltip (const std::string& tooltip);
|
||||||
|
|
||||||
/// Return label, input widget.
|
/// 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:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
CSMPrefs::ColourSetting::ColourSetting (Category *parent, Settings::Manager *values,
|
CSMPrefs::ColourSetting::ColourSetting (Category *parent, Settings::Manager *values,
|
||||||
QMutex *mutex, const std::string& key, const std::string& label, QColor default_)
|
QMutex *mutex, const std::string& key, const std::string& label, QColor default_)
|
||||||
: Setting (parent, values, mutex, key, label), mDefault (default_), mWidget(0)
|
: Setting (parent, values, mutex, key, label), mDefault (default_), mWidget(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CSMPrefs::ColourSetting& CSMPrefs::ColourSetting::setTooltip (const std::string& tooltip)
|
CSMPrefs::ColourSetting& CSMPrefs::ColourSetting::setTooltip (const std::string& tooltip)
|
||||||
|
|
|
@ -29,9 +29,9 @@ namespace CSMPrefs
|
||||||
ColourSetting& setTooltip (const std::string& tooltip);
|
ColourSetting& setTooltip (const std::string& tooltip);
|
||||||
|
|
||||||
/// Return label, input widget.
|
/// 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:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ CSMPrefs::DoubleSetting::DoubleSetting (Category *parent, Settings::Manager *val
|
||||||
QMutex *mutex, const std::string& key, const std::string& label, double default_)
|
QMutex *mutex, const std::string& key, const std::string& label, double default_)
|
||||||
: Setting (parent, values, mutex, key, label),
|
: Setting (parent, values, mutex, key, label),
|
||||||
mPrecision(2), mMin (0), mMax (std::numeric_limits<double>::max()),
|
mPrecision(2), mMin (0), mMax (std::numeric_limits<double>::max()),
|
||||||
mDefault (default_), mWidget(0)
|
mDefault (default_), mWidget(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CSMPrefs::DoubleSetting& CSMPrefs::DoubleSetting::setPrecision(int precision)
|
CSMPrefs::DoubleSetting& CSMPrefs::DoubleSetting::setPrecision(int precision)
|
||||||
|
|
|
@ -36,9 +36,9 @@ namespace CSMPrefs
|
||||||
DoubleSetting& setTooltip (const std::string& tooltip);
|
DoubleSetting& setTooltip (const std::string& tooltip);
|
||||||
|
|
||||||
/// Return label, input widget.
|
/// 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:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -35,14 +35,14 @@ CSMPrefs::EnumValues& CSMPrefs::EnumValues::add (const EnumValue& value)
|
||||||
|
|
||||||
CSMPrefs::EnumValues& CSMPrefs::EnumValues::add (const std::string& value, const std::string& tooltip)
|
CSMPrefs::EnumValues& CSMPrefs::EnumValues::add (const std::string& value, const std::string& tooltip)
|
||||||
{
|
{
|
||||||
mValues.push_back (EnumValue (value, tooltip));
|
mValues.emplace_back(value, tooltip);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CSMPrefs::EnumSetting::EnumSetting (Category *parent, Settings::Manager *values,
|
CSMPrefs::EnumSetting::EnumSetting (Category *parent, Settings::Manager *values,
|
||||||
QMutex *mutex, const std::string& key, const std::string& label, const EnumValue& default_)
|
QMutex *mutex, const std::string& key, const std::string& label, const EnumValue& default_)
|
||||||
: Setting (parent, values, mutex, key, label), mDefault (default_), mWidget(0)
|
: Setting (parent, values, mutex, key, label), mDefault (default_), mWidget(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CSMPrefs::EnumSetting& CSMPrefs::EnumSetting::setTooltip (const std::string& tooltip)
|
CSMPrefs::EnumSetting& CSMPrefs::EnumSetting::setTooltip (const std::string& tooltip)
|
||||||
|
|
|
@ -54,9 +54,9 @@ namespace CSMPrefs
|
||||||
EnumSetting& addValue (const std::string& value, const std::string& tooltip);
|
EnumSetting& addValue (const std::string& value, const std::string& tooltip);
|
||||||
|
|
||||||
/// Return label, input widget.
|
/// 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:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
CSMPrefs::IntSetting::IntSetting (Category *parent, Settings::Manager *values,
|
CSMPrefs::IntSetting::IntSetting (Category *parent, Settings::Manager *values,
|
||||||
QMutex *mutex, const std::string& key, const std::string& label, int default_)
|
QMutex *mutex, const std::string& key, const std::string& label, int default_)
|
||||||
: Setting (parent, values, mutex, key, label), mMin (0), mMax (std::numeric_limits<int>::max()),
|
: Setting (parent, values, mutex, key, label), mMin (0), mMax (std::numeric_limits<int>::max()),
|
||||||
mDefault (default_), mWidget(0)
|
mDefault (default_), mWidget(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CSMPrefs::IntSetting& CSMPrefs::IntSetting::setRange (int min, int max)
|
CSMPrefs::IntSetting& CSMPrefs::IntSetting::setRange (int min, int max)
|
||||||
|
|
|
@ -32,9 +32,9 @@ namespace CSMPrefs
|
||||||
IntSetting& setTooltip (const std::string& tooltip);
|
IntSetting& setTooltip (const std::string& tooltip);
|
||||||
|
|
||||||
/// Return label, input widget.
|
/// 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:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace CSMPrefs
|
||||||
ModifierSetting::ModifierSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
ModifierSetting::ModifierSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
||||||
const std::string& label)
|
const std::string& label)
|
||||||
: Setting(parent, values, mutex, key, label)
|
: Setting(parent, values, mutex, key, label)
|
||||||
, mButton(0)
|
, mButton(nullptr)
|
||||||
, mEditorActive(false)
|
, mEditorActive(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,13 +19,13 @@ namespace CSMPrefs
|
||||||
ModifierSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
ModifierSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
||||||
const std::string& label);
|
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:
|
protected:
|
||||||
|
|
||||||
bool eventFilter(QObject* target, QEvent* event);
|
bool eventFilter(QObject* target, QEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace CSMPrefs
|
||||||
, mLastPos(0)
|
, mLastPos(0)
|
||||||
, mActivationStatus(AS_Inactive)
|
, mActivationStatus(AS_Inactive)
|
||||||
, mModifierStatus(false)
|
, mModifierStatus(false)
|
||||||
, mAction(0)
|
, mAction(nullptr)
|
||||||
{
|
{
|
||||||
assert (parent);
|
assert (parent);
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ namespace CSMPrefs
|
||||||
, mLastPos(0)
|
, mLastPos(0)
|
||||||
, mActivationStatus(AS_Inactive)
|
, mActivationStatus(AS_Inactive)
|
||||||
, mModifierStatus(false)
|
, mModifierStatus(false)
|
||||||
, mAction(0)
|
, mAction(nullptr)
|
||||||
{
|
{
|
||||||
assert (parent);
|
assert (parent);
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ namespace CSMPrefs
|
||||||
, mLastPos(0)
|
, mLastPos(0)
|
||||||
, mActivationStatus(AS_Inactive)
|
, mActivationStatus(AS_Inactive)
|
||||||
, mModifierStatus(false)
|
, mModifierStatus(false)
|
||||||
, mAction(0)
|
, mAction(nullptr)
|
||||||
{
|
{
|
||||||
assert (parent);
|
assert (parent);
|
||||||
|
|
||||||
|
@ -218,6 +218,6 @@ namespace CSMPrefs
|
||||||
|
|
||||||
void Shortcut::actionDeleted()
|
void Shortcut::actionDeleted()
|
||||||
{
|
{
|
||||||
mAction = 0;
|
mAction = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,7 @@ namespace CSMPrefs
|
||||||
}
|
}
|
||||||
else if (pos == lastPos)
|
else if (pos == lastPos)
|
||||||
{
|
{
|
||||||
potentials.push_back(std::make_pair(result, shortcut));
|
potentials.emplace_back(result, shortcut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace CSMPrefs
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
bool eventFilter(QObject* watched, QEvent* event);
|
bool eventFilter(QObject* watched, QEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -781,7 +781,7 @@ namespace CSMPrefs
|
||||||
std::make_pair((int)Qt::Key_LastNumberRedial , "LastNumberRedial"),
|
std::make_pair((int)Qt::Key_LastNumberRedial , "LastNumberRedial"),
|
||||||
std::make_pair((int)Qt::Key_Camera , "Camera"),
|
std::make_pair((int)Qt::Key_Camera , "Camera"),
|
||||||
std::make_pair((int)Qt::Key_CameraFocus , "CameraFocus"),
|
std::make_pair((int)Qt::Key_CameraFocus , "CameraFocus"),
|
||||||
std::make_pair(0 , (const char*) 0)
|
std::make_pair(0 , (const char*) nullptr)
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace CSMPrefs
|
||||||
ShortcutSetting::ShortcutSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
ShortcutSetting::ShortcutSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
||||||
const std::string& label)
|
const std::string& label)
|
||||||
: Setting(parent, values, mutex, key, label)
|
: Setting(parent, values, mutex, key, label)
|
||||||
, mButton(0)
|
, mButton(nullptr)
|
||||||
, mEditorActive(false)
|
, mEditorActive(false)
|
||||||
, mEditorPos(0)
|
, mEditorPos(0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,13 +19,13 @@ namespace CSMPrefs
|
||||||
ShortcutSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
ShortcutSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
||||||
const std::string& label);
|
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:
|
protected:
|
||||||
|
|
||||||
bool eventFilter(QObject* target, QEvent* event);
|
bool eventFilter(QObject* target, QEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "shortcutsetting.hpp"
|
#include "shortcutsetting.hpp"
|
||||||
#include "modifiersetting.hpp"
|
#include "modifiersetting.hpp"
|
||||||
|
|
||||||
CSMPrefs::State *CSMPrefs::State::sThis = 0;
|
CSMPrefs::State *CSMPrefs::State::sThis = nullptr;
|
||||||
|
|
||||||
void CSMPrefs::State::load()
|
void CSMPrefs::State::load()
|
||||||
{
|
{
|
||||||
|
@ -599,7 +599,7 @@ CSMPrefs::State::State (const Files::ConfigurationManager& configurationManager)
|
||||||
|
|
||||||
CSMPrefs::State::~State()
|
CSMPrefs::State::~State()
|
||||||
{
|
{
|
||||||
sThis = 0;
|
sThis = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMPrefs::State::save()
|
void CSMPrefs::State::save()
|
||||||
|
|
|
@ -22,10 +22,10 @@ namespace CSMTools
|
||||||
BirthsignCheckStage (const CSMWorld::IdCollection<ESM::BirthSign> &birthsigns,
|
BirthsignCheckStage (const CSMWorld::IdCollection<ESM::BirthSign> &birthsigns,
|
||||||
const CSMWorld::Resources &textures);
|
const CSMWorld::Resources &textures);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,10 +25,10 @@ namespace CSMTools
|
||||||
const CSMWorld::Resources &meshes,
|
const CSMWorld::Resources &meshes,
|
||||||
const CSMWorld::IdCollection<ESM::Race> &races );
|
const CSMWorld::IdCollection<ESM::Race> &races );
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
||||||
|
|
||||||
ClassCheckStage (const CSMWorld::IdCollection<ESM::Class>& classes);
|
ClassCheckStage (const CSMWorld::IdCollection<ESM::Class>& classes);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
||||||
|
|
||||||
EnchantmentCheckStage (const CSMWorld::IdCollection<ESM::Enchantment>& enchantments);
|
EnchantmentCheckStage (const CSMWorld::IdCollection<ESM::Enchantment>& enchantments);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
||||||
|
|
||||||
FactionCheckStage (const CSMWorld::IdCollection<ESM::Faction>& factions);
|
FactionCheckStage (const CSMWorld::IdCollection<ESM::Faction>& factions);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,10 +16,10 @@ namespace CSMTools
|
||||||
|
|
||||||
GmstCheckStage(const CSMWorld::IdCollection<ESM::GameSetting>& gameSettings);
|
GmstCheckStage(const CSMWorld::IdCollection<ESM::GameSetting>& gameSettings);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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
|
///< Messages resulting from this stage will be appended to \a messages
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -18,10 +18,10 @@ namespace CSMTools
|
||||||
JournalCheckStage(const CSMWorld::IdCollection<ESM::Dialogue>& journals,
|
JournalCheckStage(const CSMWorld::IdCollection<ESM::Dialogue>& journals,
|
||||||
const CSMWorld::InfoCollection& journalInfos);
|
const CSMWorld::InfoCollection& journalInfos);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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
|
///< Messages resulting from this stage will be appended to \a messages
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -32,9 +32,9 @@ namespace CSMTools
|
||||||
const CSMWorld::Resources &icons,
|
const CSMWorld::Resources &icons,
|
||||||
const CSMWorld::Resources &textures);
|
const CSMWorld::Resources &textures);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< 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,
|
MandatoryIdStage (const CSMWorld::CollectionBase& idCollection, const CSMWorld::UniversalId& collectionId,
|
||||||
const std::vector<std::string>& ids);
|
const std::vector<std::string>& ids);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace CSMTools
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
|
|
||||||
virtual void operationDone();
|
void operationDone() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ void CSMTools::MergeReferencesStage::perform (int stage, CSMDoc::Messages& messa
|
||||||
ref.mNew = false;
|
ref.mNew = false;
|
||||||
|
|
||||||
CSMWorld::Record<CSMWorld::CellRef> newRecord (
|
CSMWorld::Record<CSMWorld::CellRef> newRecord (
|
||||||
CSMWorld::RecordBase::State_ModifiedOnly, 0, &ref);
|
CSMWorld::RecordBase::State_ModifiedOnly, nullptr, &ref);
|
||||||
|
|
||||||
mState.mTarget->getData().getReferences().appendRecord (newRecord);
|
mState.mTarget->getData().getReferences().appendRecord (newRecord);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,10 @@ namespace CSMTools
|
||||||
|
|
||||||
StartMergeStage (MergeState& state);
|
StartMergeStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,10 +38,10 @@ namespace CSMTools
|
||||||
|
|
||||||
FinishMergedDocumentStage (MergeState& state, ToUTF8::FromType encoding);
|
FinishMergedDocumentStage (MergeState& state, ToUTF8::FromType encoding);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,10 +55,10 @@ namespace CSMTools
|
||||||
|
|
||||||
MergeIdCollectionStage (MergeState& state, Collection& (CSMWorld::Data::*accessor)());
|
MergeIdCollectionStage (MergeState& state, Collection& (CSMWorld::Data::*accessor)());
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ namespace CSMTools
|
||||||
const CSMWorld::Record<RecordType>& record = source.getRecord (stage);
|
const CSMWorld::Record<RecordType>& record = source.getRecord (stage);
|
||||||
|
|
||||||
if (!record.isDeleted())
|
if (!record.isDeleted())
|
||||||
target.appendRecord (CSMWorld::Record<RecordType> (CSMWorld::RecordBase::State_ModifiedOnly, 0, &record.get()));
|
target.appendRecord (CSMWorld::Record<RecordType> (CSMWorld::RecordBase::State_ModifiedOnly, nullptr, &record.get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
class MergeRefIdsStage : public CSMDoc::Stage
|
class MergeRefIdsStage : public CSMDoc::Stage
|
||||||
|
@ -93,10 +93,10 @@ namespace CSMTools
|
||||||
|
|
||||||
MergeRefIdsStage (MergeState& state);
|
MergeRefIdsStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -109,10 +109,10 @@ namespace CSMTools
|
||||||
|
|
||||||
MergeReferencesStage (MergeState& state);
|
MergeReferencesStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -125,10 +125,10 @@ namespace CSMTools
|
||||||
|
|
||||||
PopulateLandTexturesMergeStage (MergeState& state);
|
PopulateLandTexturesMergeStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -140,10 +140,10 @@ namespace CSMTools
|
||||||
|
|
||||||
MergeLandStage (MergeState& state);
|
MergeLandStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -157,10 +157,10 @@ namespace CSMTools
|
||||||
|
|
||||||
FixLandsAndLandTexturesMergeStage (MergeState& state);
|
FixLandsAndLandTexturesMergeStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -174,10 +174,10 @@ namespace CSMTools
|
||||||
|
|
||||||
CleanupLandTexturesMergeStage (MergeState& state);
|
CleanupLandTexturesMergeStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,9 +32,9 @@ namespace CSMTools
|
||||||
PathgridCheckStage (const CSMWorld::SubCellCollection<CSMWorld::Pathgrid,
|
PathgridCheckStage (const CSMWorld::SubCellCollection<CSMWorld::Pathgrid,
|
||||||
CSMWorld::IdAccessor<CSMWorld::Pathgrid> >& pathgrids);
|
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);
|
RaceCheckStage (const CSMWorld::IdCollection<ESM::Race>& races);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,8 @@ namespace CSMTools
|
||||||
const CSMWorld::Resources& icons,
|
const CSMWorld::Resources& icons,
|
||||||
const CSMWorld::IdCollection<ESM::BodyPart>& bodyparts);
|
const CSMWorld::IdCollection<ESM::BodyPart>& bodyparts);
|
||||||
|
|
||||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//CONCRETE CHECKS
|
//CONCRETE CHECKS
|
||||||
|
|
|
@ -14,8 +14,8 @@ namespace CSMTools
|
||||||
const CSMWorld::IdCollection<CSMWorld::Cell>& cells,
|
const CSMWorld::IdCollection<CSMWorld::Cell>& cells,
|
||||||
const CSMWorld::IdCollection<ESM::Faction>& factions);
|
const CSMWorld::IdCollection<ESM::Faction>& factions);
|
||||||
|
|
||||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const CSMWorld::RefCollection& mReferences;
|
const CSMWorld::RefCollection& mReferences;
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
||||||
|
|
||||||
RegionCheckStage (const CSMWorld::IdCollection<ESM::Region>& regions);
|
RegionCheckStage (const CSMWorld::IdCollection<ESM::Region>& regions);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,15 +33,15 @@ namespace CSMTools
|
||||||
|
|
||||||
ReportModel (bool fieldColumn = false, bool severityColumn = true);
|
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);
|
void add (const CSMDoc::Message& message);
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ void CSMTools::ScriptCheckStage::report (const std::string& message, Type type)
|
||||||
}
|
}
|
||||||
|
|
||||||
CSMTools::ScriptCheckStage::ScriptCheckStage (const CSMDoc::Document& document)
|
CSMTools::ScriptCheckStage::ScriptCheckStage (const CSMDoc::Document& document)
|
||||||
: mDocument (document), mContext (document.getData()), mMessages (0), mWarningMode (Mode_Ignore)
|
: mDocument (document), mContext (document.getData()), mMessages (nullptr), mWarningMode (Mode_Ignore)
|
||||||
{
|
{
|
||||||
/// \todo add an option to configure warning mode
|
/// \todo add an option to configure warning mode
|
||||||
setWarningsMode (0);
|
setWarningsMode (0);
|
||||||
|
@ -73,7 +73,7 @@ int CSMTools::ScriptCheckStage::setup()
|
||||||
mWarningMode = Mode_Strict;
|
mWarningMode = Mode_Strict;
|
||||||
|
|
||||||
mContext.clear();
|
mContext.clear();
|
||||||
mMessages = 0;
|
mMessages = nullptr;
|
||||||
mId.clear();
|
mId.clear();
|
||||||
Compiler::ErrorHandler::reset();
|
Compiler::ErrorHandler::reset();
|
||||||
|
|
||||||
|
@ -130,5 +130,5 @@ void CSMTools::ScriptCheckStage::perform (int stage, CSMDoc::Messages& messages)
|
||||||
messages.add (id, stream.str(), "", CSMDoc::Message::Severity_SeriousError);
|
messages.add (id, stream.str(), "", CSMDoc::Message::Severity_SeriousError);
|
||||||
}
|
}
|
||||||
|
|
||||||
mMessages = 0;
|
mMessages = nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,20 +36,20 @@ namespace CSMTools
|
||||||
|
|
||||||
CSMDoc::Message::Severity getSeverity (Type type);
|
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.
|
///< 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
|
///< Report a file related error
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ScriptCheckStage (const CSMDoc::Document& document);
|
ScriptCheckStage (const CSMDoc::Document& document);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "searchoperation.hpp"
|
#include "searchoperation.hpp"
|
||||||
|
|
||||||
CSMTools::SearchStage::SearchStage (const CSMWorld::IdTableBase *model)
|
CSMTools::SearchStage::SearchStage (const CSMWorld::IdTableBase *model)
|
||||||
: mModel (model), mOperation (0)
|
: mModel (model), mOperation (nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
int CSMTools::SearchStage::setup()
|
int CSMTools::SearchStage::setup()
|
||||||
|
|
|
@ -24,10 +24,10 @@ namespace CSMTools
|
||||||
|
|
||||||
SearchStage (const CSMWorld::IdTableBase *model);
|
SearchStage (const CSMWorld::IdTableBase *model);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
|
|
||||||
void setOperation (const SearchOperation *operation);
|
void setOperation (const SearchOperation *operation);
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
||||||
|
|
||||||
SkillCheckStage (const CSMWorld::IdCollection<ESM::Skill>& skills);
|
SkillCheckStage (const CSMWorld::IdCollection<ESM::Skill>& skills);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,10 @@ namespace CSMTools
|
||||||
SoundCheckStage (const CSMWorld::IdCollection<ESM::Sound>& sounds,
|
SoundCheckStage (const CSMWorld::IdCollection<ESM::Sound>& sounds,
|
||||||
const CSMWorld::Resources &soundfiles);
|
const CSMWorld::Resources &soundfiles);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< 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::IdCollection<ESM::Sound> &sounds,
|
||||||
const CSMWorld::RefIdCollection &objects);
|
const CSMWorld::RefIdCollection &objects);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
||||||
|
|
||||||
SpellCheckStage (const CSMWorld::IdCollection<ESM::Spell>& spells);
|
SpellCheckStage (const CSMWorld::IdCollection<ESM::Spell>& spells);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,8 @@ namespace CSMTools
|
||||||
StartScriptCheckStage (const CSMWorld::IdCollection<ESM::StartScript>& startScripts,
|
StartScriptCheckStage (const CSMWorld::IdCollection<ESM::StartScript>& startScripts,
|
||||||
const CSMWorld::IdCollection<ESM::Script>& scripts);
|
const CSMWorld::IdCollection<ESM::Script>& scripts);
|
||||||
|
|
||||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ CSMDoc::OperationHolder *CSMTools::Tools::get (int type)
|
||||||
case CSMDoc::State_Merging: return &mMerge;
|
case CSMDoc::State_Merging: return &mMerge;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CSMDoc::OperationHolder *CSMTools::Tools::get (int type) const
|
const CSMDoc::OperationHolder *CSMTools::Tools::get (int type) const
|
||||||
|
@ -138,8 +138,8 @@ CSMDoc::OperationHolder *CSMTools::Tools::getVerifier()
|
||||||
}
|
}
|
||||||
|
|
||||||
CSMTools::Tools::Tools (CSMDoc::Document& document, ToUTF8::FromType encoding)
|
CSMTools::Tools::Tools (CSMDoc::Document& document, ToUTF8::FromType encoding)
|
||||||
: mDocument (document), mData (document.getData()), mVerifierOperation (0),
|
: mDocument (document), mData (document.getData()), mVerifierOperation (nullptr),
|
||||||
mSearchOperation (0), mMergeOperation (0), mNextReportNumber (0), mEncoding (encoding)
|
mSearchOperation (nullptr), mMergeOperation (nullptr), mNextReportNumber (0), mEncoding (encoding)
|
||||||
{
|
{
|
||||||
// index 0: load error log
|
// index 0: load error log
|
||||||
mReports.insert (std::make_pair (mNextReportNumber++, new ReportModel));
|
mReports.insert (std::make_pair (mNextReportNumber++, new ReportModel));
|
||||||
|
|
|
@ -40,10 +40,10 @@ namespace CSMTools
|
||||||
const CSMWorld::RefIdData& referencables,
|
const CSMWorld::RefIdData& referencables,
|
||||||
const CSMWorld::Resources& soundFiles);
|
const CSMWorld::Resources& soundFiles);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \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
|
///< Messages resulting from this stage will be appended to \a messages
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -120,19 +120,19 @@ namespace CSMWorld
|
||||||
void add (const ESXRecordT& record);
|
void add (const ESXRecordT& record);
|
||||||
///< Add a new record (modified)
|
///< 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();
|
virtual void merge();
|
||||||
///< Merge modified into base.
|
///< Merge modified into base.
|
||||||
|
@ -140,43 +140,43 @@ namespace CSMWorld
|
||||||
virtual void purge();
|
virtual void purge();
|
||||||
///< Remove records that are flagged as erased.
|
///< 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,
|
void appendBlankRecord (const std::string& id,
|
||||||
UniversalId::Type type = UniversalId::Type_None);
|
UniversalId::Type type = UniversalId::Type_None) override;
|
||||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
///< \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 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.
|
///< Change the state of a record from base to modified, if it is not already.
|
||||||
/// \return True if the record was changed.
|
/// \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.
|
////< Search record with \a id.
|
||||||
/// \return index of record (if found) or -1 (not found)
|
/// \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.
|
///< If the record type does not match, an exception is thrown.
|
||||||
///
|
///
|
||||||
/// \attention \a record must not change the ID.
|
/// \attention \a record must not change the ID.
|
||||||
|
|
||||||
virtual void appendRecord (const RecordBase& record,
|
void appendRecord (const RecordBase& record,
|
||||||
UniversalId::Type type = UniversalId::Type_None);
|
UniversalId::Type type = UniversalId::Type_None) override;
|
||||||
///< If the record type does not match, an exception is thrown.
|
///< If the record type does not match, an exception is thrown.
|
||||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
///< \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,
|
int getAppendIndex (const std::string& id,
|
||||||
UniversalId::Type type = UniversalId::Type_None) const;
|
UniversalId::Type type = UniversalId::Type_None) const override;
|
||||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
///< \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
|
///< Return a sorted collection of all IDs
|
||||||
///
|
///
|
||||||
/// \param listDeleted include deleted record in the list
|
/// \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
|
/// If the index is invalid either generally (by being out of range) or for the particular
|
||||||
/// record, an exception is thrown.
|
/// 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
|
///< 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).
|
/// 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)
|
: 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.
|
// There is nothing to do here.
|
||||||
// This prevents exceptions from parent's implementation
|
// 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()
|
// by default editable; also see IdTree::hasChildren()
|
||||||
if (mFixedRows)
|
if (mFixedRows)
|
||||||
|
@ -226,7 +226,7 @@ namespace CSMWorld
|
||||||
return QVariant::fromValue(ColumnBase::TableEdit_Full);
|
return QVariant::fromValue(ColumnBase::TableEdit_Full);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool isEditable() const
|
bool isEditable() const override
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ namespace CSMWorld
|
||||||
NestedChildColumn (int id,
|
NestedChildColumn (int id,
|
||||||
Display display, int flags = ColumnBase::Flag_Dialogue, bool isEditable = true);
|
Display display, int flags = ColumnBase::Flag_Dialogue, bool isEditable = true);
|
||||||
|
|
||||||
virtual bool isEditable() const;
|
bool isEditable() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool mIsEditable;
|
bool mIsEditable;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -127,7 +127,7 @@ std::vector<CSMWorld::UniversalId> CSMWorld::CommandDispatcher::getExtendedTypes
|
||||||
if (mId==UniversalId::Type_Cells)
|
if (mId==UniversalId::Type_Cells)
|
||||||
{
|
{
|
||||||
tables.push_back (mId);
|
tables.push_back (mId);
|
||||||
tables.push_back (UniversalId::Type_References);
|
tables.emplace_back(UniversalId::Type_References);
|
||||||
/// \todo add other cell-specific types
|
/// \todo add other cell-specific types
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CommandDispatcher (CSMDoc::Document& document, const CSMWorld::UniversalId& id,
|
CommandDispatcher (CSMDoc::Document& document, const CSMWorld::UniversalId& id,
|
||||||
QObject *parent = 0);
|
QObject *parent = nullptr);
|
||||||
///< \param id ID of the table the commands should operate on primarily.
|
///< \param id ID of the table the commands should operate on primarily.
|
||||||
|
|
||||||
void setEditLock (bool locked);
|
void setEditLock (bool locked);
|
||||||
|
|
|
@ -290,7 +290,7 @@ void CSMWorld::CreateCommand::undo()
|
||||||
}
|
}
|
||||||
|
|
||||||
CSMWorld::RevertCommand::RevertCommand (IdTable& model, const std::string& id, QUndoCommand* parent)
|
CSMWorld::RevertCommand::RevertCommand (IdTable& model, const std::string& id, QUndoCommand* parent)
|
||||||
: QUndoCommand (parent), mModel (model), mId (id), mOld (0)
|
: QUndoCommand (parent), mModel (model), mId (id), mOld (nullptr)
|
||||||
{
|
{
|
||||||
setText (("Revert record " + id).c_str());
|
setText (("Revert record " + id).c_str());
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ void CSMWorld::RevertCommand::undo()
|
||||||
|
|
||||||
CSMWorld::DeleteCommand::DeleteCommand (IdTable& model,
|
CSMWorld::DeleteCommand::DeleteCommand (IdTable& model,
|
||||||
const std::string& id, CSMWorld::UniversalId::Type type, QUndoCommand* parent)
|
const std::string& id, CSMWorld::UniversalId::Type type, QUndoCommand* parent)
|
||||||
: QUndoCommand (parent), mModel (model), mId (id), mOld (0), mType(type)
|
: QUndoCommand (parent), mModel (model), mId (id), mOld (nullptr), mType(type)
|
||||||
{
|
{
|
||||||
setText (("Delete record " + id).c_str());
|
setText (("Delete record " + id).c_str());
|
||||||
|
|
||||||
|
|
|
@ -140,11 +140,11 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ModifyCommand (QAbstractItemModel& model, const QModelIndex& index, const QVariant& new_,
|
ModifyCommand (QAbstractItemModel& model, const QModelIndex& index, const QVariant& new_,
|
||||||
QUndoCommand *parent = 0);
|
QUndoCommand *parent = nullptr);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CreateCommand : public QUndoCommand
|
class CreateCommand : public QUndoCommand
|
||||||
|
@ -167,7 +167,7 @@ namespace CSMWorld
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CreateCommand (IdTable& model, const std::string& id, QUndoCommand *parent = 0);
|
CreateCommand (IdTable& model, const std::string& id, QUndoCommand *parent = nullptr);
|
||||||
|
|
||||||
void setType (UniversalId::Type type);
|
void setType (UniversalId::Type type);
|
||||||
|
|
||||||
|
@ -175,9 +175,9 @@ namespace CSMWorld
|
||||||
|
|
||||||
void addNestedValue(int parentColumn, int nestedColumn, const QVariant &value);
|
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
|
class CloneCommand : public CreateCommand
|
||||||
|
@ -189,11 +189,11 @@ namespace CSMWorld
|
||||||
CloneCommand (IdTable& model, const std::string& idOrigin,
|
CloneCommand (IdTable& model, const std::string& idOrigin,
|
||||||
const std::string& IdDestination,
|
const std::string& IdDestination,
|
||||||
const UniversalId::Type type,
|
const UniversalId::Type type,
|
||||||
QUndoCommand* parent = 0);
|
QUndoCommand* parent = nullptr);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RevertCommand : public QUndoCommand
|
class RevertCommand : public QUndoCommand
|
||||||
|
@ -208,13 +208,13 @@ namespace CSMWorld
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
RevertCommand (IdTable& model, const std::string& id, QUndoCommand *parent = 0);
|
RevertCommand (IdTable& model, const std::string& id, QUndoCommand *parent = nullptr);
|
||||||
|
|
||||||
virtual ~RevertCommand();
|
virtual ~RevertCommand();
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DeleteCommand : public QUndoCommand
|
class DeleteCommand : public QUndoCommand
|
||||||
|
@ -231,13 +231,13 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DeleteCommand (IdTable& model, const std::string& id,
|
DeleteCommand (IdTable& model, const std::string& id,
|
||||||
UniversalId::Type type = UniversalId::Type_None, QUndoCommand *parent = 0);
|
UniversalId::Type type = UniversalId::Type_None, QUndoCommand *parent = nullptr);
|
||||||
|
|
||||||
virtual ~DeleteCommand();
|
virtual ~DeleteCommand();
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ReorderRowsCommand : public QUndoCommand
|
class ReorderRowsCommand : public QUndoCommand
|
||||||
|
@ -250,18 +250,18 @@ namespace CSMWorld
|
||||||
|
|
||||||
ReorderRowsCommand (IdTable& model, int baseIndex, const std::vector<int>& newOrder);
|
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
|
class CreatePathgridCommand : public CreateCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CreatePathgridCommand(IdTable& model, const std::string& id, QUndoCommand *parent = 0);
|
CreatePathgridCommand(IdTable& model, const std::string& id, QUndoCommand *parent = nullptr);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Update cell ID according to x/y-coordinates
|
/// \brief Update cell ID according to x/y-coordinates
|
||||||
|
@ -279,11 +279,11 @@ namespace CSMWorld
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
UpdateCellCommand (IdTable& model, int row, QUndoCommand *parent = 0);
|
UpdateCellCommand (IdTable& model, int row, QUndoCommand *parent = nullptr);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -316,11 +316,11 @@ namespace CSMWorld
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DeleteNestedCommand (IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent = 0);
|
DeleteNestedCommand (IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent = nullptr);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AddNestedCommand : public QUndoCommand, private NestedTableStoring
|
class AddNestedCommand : public QUndoCommand, private NestedTableStoring
|
||||||
|
@ -338,11 +338,11 @@ namespace CSMWorld
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
AddNestedCommand(IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent = 0);
|
AddNestedCommand(IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent = nullptr);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ int CSMWorld::Data::count (RecordBase::State state, const CollectionBase& collec
|
||||||
CSMWorld::Data::Data (ToUTF8::FromType encoding, bool fsStrict, const Files::PathContainer& dataPaths,
|
CSMWorld::Data::Data (ToUTF8::FromType encoding, bool fsStrict, const Files::PathContainer& dataPaths,
|
||||||
const std::vector<std::string>& archives, const boost::filesystem::path& resDir)
|
const std::vector<std::string>& archives, const boost::filesystem::path& resDir)
|
||||||
: mEncoder (encoding), mPathgrids (mCells), mRefs (mCells),
|
: mEncoder (encoding), mPathgrids (mCells), mRefs (mCells),
|
||||||
mReader (0), mDialogue (0), mReaderIndex(1),
|
mReader (nullptr), mDialogue (nullptr), mReaderIndex(1),
|
||||||
mFsStrict(fsStrict), mDataPaths(dataPaths), mArchives(archives)
|
mFsStrict(fsStrict), mDataPaths(dataPaths), mArchives(archives)
|
||||||
{
|
{
|
||||||
mVFS.reset(new VFS::Manager(mFsStrict));
|
mVFS.reset(new VFS::Manager(mFsStrict));
|
||||||
|
@ -916,7 +916,7 @@ const CSMWorld::MetaData& CSMWorld::Data::getMetaData() const
|
||||||
|
|
||||||
void CSMWorld::Data::setMetaData (const MetaData& metaData)
|
void CSMWorld::Data::setMetaData (const MetaData& metaData)
|
||||||
{
|
{
|
||||||
Record<MetaData> record (RecordBase::State_ModifiedOnly, 0, &metaData);
|
Record<MetaData> record (RecordBase::State_ModifiedOnly, nullptr, &metaData);
|
||||||
mMetaData.setRecord (0, record);
|
mMetaData.setRecord (0, record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -932,7 +932,7 @@ QAbstractItemModel *CSMWorld::Data::getTableModel (const CSMWorld::UniversalId&
|
||||||
// construction of the ESX data where no update signals are available.
|
// construction of the ESX data where no update signals are available.
|
||||||
if (id.getType()==UniversalId::Type_RegionMap)
|
if (id.getType()==UniversalId::Type_RegionMap)
|
||||||
{
|
{
|
||||||
RegionMap *table = 0;
|
RegionMap *table = nullptr;
|
||||||
addModel (table = new RegionMap (*this), UniversalId::Type_RegionMap, false);
|
addModel (table = new RegionMap (*this), UniversalId::Type_RegionMap, false);
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
@ -962,9 +962,9 @@ int CSMWorld::Data::startLoading (const boost::filesystem::path& path, bool base
|
||||||
// Don't delete the Reader yet. Some record types store a reference to the Reader to handle on-demand loading
|
// Don't delete the Reader yet. Some record types store a reference to the Reader to handle on-demand loading
|
||||||
std::shared_ptr<ESM::ESMReader> ptr(mReader);
|
std::shared_ptr<ESM::ESMReader> ptr(mReader);
|
||||||
mReaders.push_back(ptr);
|
mReaders.push_back(ptr);
|
||||||
mReader = 0;
|
mReader = nullptr;
|
||||||
|
|
||||||
mDialogue = 0;
|
mDialogue = nullptr;
|
||||||
|
|
||||||
mReader = new ESM::ESMReader;
|
mReader = new ESM::ESMReader;
|
||||||
mReader->setEncoder (&mEncoder);
|
mReader->setEncoder (&mEncoder);
|
||||||
|
@ -982,7 +982,7 @@ int CSMWorld::Data::startLoading (const boost::filesystem::path& path, bool base
|
||||||
metaData.mId = "sys::meta";
|
metaData.mId = "sys::meta";
|
||||||
metaData.load (*mReader);
|
metaData.load (*mReader);
|
||||||
|
|
||||||
mMetaData.setRecord (0, Record<MetaData> (RecordBase::State_ModifiedOnly, 0, &metaData));
|
mMetaData.setRecord (0, Record<MetaData> (RecordBase::State_ModifiedOnly, nullptr, &metaData));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix uninitialized master data index
|
// Fix uninitialized master data index
|
||||||
|
@ -1064,9 +1064,9 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Messages& messages)
|
||||||
else
|
else
|
||||||
delete mReader;
|
delete mReader;
|
||||||
|
|
||||||
mReader = 0;
|
mReader = nullptr;
|
||||||
|
|
||||||
mDialogue = 0;
|
mDialogue = nullptr;
|
||||||
|
|
||||||
loadFallbackEntries();
|
loadFallbackEntries();
|
||||||
|
|
||||||
|
@ -1151,7 +1151,7 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Messages& messages)
|
||||||
if (isDeleted)
|
if (isDeleted)
|
||||||
{
|
{
|
||||||
// record vector can be shuffled around which would make pointer to record invalid
|
// record vector can be shuffled around which would make pointer to record invalid
|
||||||
mDialogue = 0;
|
mDialogue = nullptr;
|
||||||
|
|
||||||
if (mJournals.tryDelete (record.mId))
|
if (mJournals.tryDelete (record.mId))
|
||||||
{
|
{
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue