Merge branch 'main' into feature/build_class
This commit is contained in:
@@ -59,9 +59,9 @@ __license__ = "GPLv3"
|
||||
__author__ = "Veronica Berglyd Olsen"
|
||||
__maintainer__ = "Veronica Berglyd Olsen"
|
||||
__email__ = "code@vkbo.net"
|
||||
__version__ = "2.0.3"
|
||||
__hexversion__ = "0x020003f0"
|
||||
__date__ = "2023-01-08"
|
||||
__version__ = "2.0.4"
|
||||
__hexversion__ = "0x020004f0"
|
||||
__date__ = "2023-01-29"
|
||||
__status__ = "Stable"
|
||||
__domain__ = "novelwriter.io"
|
||||
__url__ = "https://novelwriter.io"
|
||||
@@ -179,12 +179,12 @@ def main(sysArgs=None):
|
||||
"At least Python 3.7 is required, found %s" % CONFIG.verPyString
|
||||
)
|
||||
errorCode |= 0x04
|
||||
if CONFIG.verQtValue < 51000:
|
||||
if CONFIG.verQtValue < 0x050a00:
|
||||
errorData.append(
|
||||
"At least Qt5 version 5.10 is required, found %s" % CONFIG.verQtString
|
||||
)
|
||||
errorCode |= 0x08
|
||||
if CONFIG.verPyQtValue < 51000:
|
||||
if CONFIG.verPyQtValue < 0x050a00:
|
||||
errorData.append(
|
||||
"At least PyQt5 version 5.10 is required, found %s" % CONFIG.verPyQtString
|
||||
)
|
||||
|
||||
@@ -109,5 +109,10 @@ been updated and a renderring issue with one of them fixed. Chinese, Norwegian,
|
||||
and Spanish translations have been updated as well. A new credits tab has been added to the About
|
||||
dialog box, replacing the Credits section on the main About tab.</p>
|
||||
|
||||
<h3>Patch 2.0.4 – 29 January 2023</h3>
|
||||
|
||||
<p>This is a patch release that fixes a bug where novelWriter would crash if PyQt5 version 5.15.8
|
||||
was installed and imported.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -277,33 +277,6 @@ def yesNo(value):
|
||||
return "yes" if value else "no"
|
||||
|
||||
|
||||
def splitVersionNumber(value):
|
||||
"""Split a version string on the form aa.bb.cc into major, minor
|
||||
and patch, and computes an integer value aabbcc.
|
||||
"""
|
||||
if not isinstance(value, str):
|
||||
return 0, 0, 0, 0
|
||||
|
||||
vMajor = 0
|
||||
vMinor = 0
|
||||
vPatch = 0
|
||||
vInt = 0
|
||||
|
||||
vBits = value.split(".")
|
||||
nBits = len(vBits)
|
||||
|
||||
if nBits > 0:
|
||||
vMajor = checkInt(vBits[0], 0)
|
||||
if nBits > 1:
|
||||
vMinor = checkInt(vBits[1], 0)
|
||||
if nBits > 2:
|
||||
vPatch = checkInt(vBits[2], 0)
|
||||
|
||||
vInt = vMajor*10000 + vMinor*100 + vPatch
|
||||
|
||||
return vMajor, vMinor, vPatch, vInt
|
||||
|
||||
|
||||
def transferCase(source, target):
|
||||
"""Transfers the case of the source word to the target word. This
|
||||
will consider all upper or lower, and first char capitalisation.
|
||||
|
||||
+6
-19
@@ -30,14 +30,13 @@ import logging
|
||||
from time import time
|
||||
from pathlib import Path
|
||||
|
||||
from PyQt5.Qt import PYQT_VERSION_STR
|
||||
from PyQt5.QtCore import (
|
||||
QT_VERSION_STR, QStandardPaths, QSysInfo, QLocale, QLibraryInfo,
|
||||
QTranslator
|
||||
QT_VERSION, QT_VERSION_STR, PYQT_VERSION, PYQT_VERSION_STR, QStandardPaths,
|
||||
QSysInfo, QLocale, QLibraryInfo, QTranslator
|
||||
)
|
||||
|
||||
from novelwriter.error import logException, formatException
|
||||
from novelwriter.common import checkPath, splitVersionNumber, formatTimeStamp, NWConfigParser
|
||||
from novelwriter.common import checkPath, formatTimeStamp, NWConfigParser
|
||||
from novelwriter.constants import nwFiles, nwUnicode
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -190,25 +189,13 @@ class Config:
|
||||
# ==========================
|
||||
|
||||
# Check Qt5 Versions
|
||||
verQt = splitVersionNumber(QT_VERSION_STR)
|
||||
self.verQtString = QT_VERSION_STR
|
||||
self.verQtMajor = verQt[0]
|
||||
self.verQtMinor = verQt[1]
|
||||
self.verQtPatch = verQt[2]
|
||||
self.verQtValue = verQt[3]
|
||||
|
||||
verQt = splitVersionNumber(PYQT_VERSION_STR)
|
||||
self.verQtString = QT_VERSION_STR
|
||||
self.verQtValue = QT_VERSION
|
||||
self.verPyQtString = PYQT_VERSION_STR
|
||||
self.verPyQtMajor = verQt[0]
|
||||
self.verPyQtMinor = verQt[1]
|
||||
self.verPyQtPatch = verQt[2]
|
||||
self.verPyQtValue = verQt[3]
|
||||
self.verPyQtValue = PYQT_VERSION
|
||||
|
||||
# Check Python Version
|
||||
self.verPyString = sys.version.split()[0]
|
||||
self.verPyMajor = sys.version_info[0]
|
||||
self.verPyMinor = sys.version_info[1]
|
||||
self.verPyPatch = sys.version_info[2]
|
||||
self.verPyHexVal = sys.hexversion
|
||||
|
||||
# Check OS Type
|
||||
|
||||
@@ -112,8 +112,7 @@ class NWErrorMessage(QDialog):
|
||||
"""
|
||||
from traceback import format_tb
|
||||
from novelwriter import __issuesurl__, __version__
|
||||
from PyQt5.Qt import PYQT_VERSION_STR
|
||||
from PyQt5.QtCore import QT_VERSION_STR, QSysInfo
|
||||
from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR, QSysInfo
|
||||
|
||||
self.msgHead.setText((
|
||||
"<p>An unhandled error has been encountered.</p>"
|
||||
|
||||
@@ -2512,7 +2512,7 @@ class GuiDocEditSearch(QFrame):
|
||||
# Using the Unicode-capable QRegularExpression class was
|
||||
# only added in Qt 5.13. Otherwise, 5.3 and up supports
|
||||
# only the QRegExp class.
|
||||
if self.mainConf.verQtValue >= 51300:
|
||||
if self.mainConf.verQtValue >= 0x050d00:
|
||||
rxOpt = QRegularExpression.UseUnicodePropertiesOption
|
||||
if not self.isCaseSense:
|
||||
rxOpt |= QRegularExpression.CaseInsensitiveOption
|
||||
|
||||
@@ -87,9 +87,9 @@ class GuiMain(QMainWindow):
|
||||
logger.info("OS: %s", self.mainConf.osType)
|
||||
logger.info("Kernel: %s", self.mainConf.kernelVer)
|
||||
logger.info("Host: %s", self.mainConf.hostName)
|
||||
logger.info("Qt5: %s (%d)", self.mainConf.verQtString, self.mainConf.verQtValue)
|
||||
logger.info("PyQt5: %s (%d)", self.mainConf.verPyQtString, self.mainConf.verPyQtValue)
|
||||
logger.info("Python: %s (0x%x)", self.mainConf.verPyString, self.mainConf.verPyHexVal)
|
||||
logger.info("Qt5: %s (0x%06x)", self.mainConf.verQtString, self.mainConf.verQtValue)
|
||||
logger.info("PyQt5: %s (0x%06x)", self.mainConf.verPyQtString, self.mainConf.verPyQtValue)
|
||||
logger.info("Python: %s (0x%08x)", self.mainConf.verPyString, self.mainConf.verPyHexVal)
|
||||
logger.info("GUI Language: %s", self.mainConf.guiLocale)
|
||||
|
||||
# Core Classes
|
||||
|
||||
Reference in New Issue
Block a user