diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-09-25 17:08:58 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-09-25 17:09:27 +0200 |
commit | 94023741a3d0377b5a39914646bc06b06f6fa548 (patch) | |
tree | 33495197ac9ab73e5e572f7670c3861a112a0bf4 | |
parent | aeccae345301738e8bd9016739ce0113d40301a6 (diff) | |
parent | 0dc55e6b67c729dabe2dbdad3bb21ca9ba9b2582 (diff) |
Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"
-rw-r--r-- | build_scripts/utils.py | 2 | ||||
-rw-r--r-- | examples/sql/books/createdb.py | 13 | ||||
-rw-r--r-- | sources/pyside2/libpyside/pyside.cpp | 3 |
3 files changed, 9 insertions, 9 deletions
diff --git a/build_scripts/utils.py b/build_scripts/utils.py index dc90d99b7..85a2f9e36 100644 --- a/build_scripts/utils.py +++ b/build_scripts/utils.py @@ -1141,7 +1141,7 @@ def run_instruction(instruction, error, initial_env=None): def acceptCITestConfiguration(hostOS, hostOSVer, targetArch, compiler): # Disable unsupported CI configs for now # NOTE: String must match with QT CI's storagestruct thrift - if hostOSVer in ["WinRT_10", "WebAssembly", "Ubuntu_18_04"] \ + if hostOSVer in ["WinRT_10", "WebAssembly", "Ubuntu_18_04", "Android_ANY"] \ or hostOSVer.startswith("SLES_"): print("Disabled " + hostOSVer + " from Coin configuration") return False diff --git a/examples/sql/books/createdb.py b/examples/sql/books/createdb.py index d03060ad5..1c27abf25 100644 --- a/examples/sql/books/createdb.py +++ b/examples/sql/books/createdb.py @@ -39,8 +39,7 @@ ############################################################################# from PySide2.QtSql import QSqlDatabase, QSqlError, QSqlQuery -from datetime import datetime - +from datetime import date def add_book(q, title, year, authorId, genreId, rating): q.addBindValue(title) @@ -59,7 +58,7 @@ def add_genre(q, name): def add_author(q, name, birthdate): q.addBindValue(name) - q.addBindValue(birthdate) + q.addBindValue(str(birthdate)) q.exec_() return q.lastInsertId() @@ -68,7 +67,7 @@ BOOKS_SQL = """ genre integer, year integer, rating integer) """ AUTHORS_SQL = """ - create table authors(id integer primary key, name varchar, birthdate date) + create table authors(id integer primary key, name varchar, birthdate text) """ GENRES_SQL = """ create table genres(id integer primary key, name varchar) @@ -106,9 +105,9 @@ def init_db(): check(q.exec_, GENRES_SQL) check(q.prepare, INSERT_AUTHOR_SQL) - asimovId = add_author(q, "Isaac Asimov", datetime(1920, 2, 1)) - greeneId = add_author(q, "Graham Greene", datetime(1904, 10, 2)) - pratchettId = add_author(q, "Terry Pratchett", datetime(1948, 4, 28)) + asimovId = add_author(q, "Isaac Asimov", date(1920, 2, 1)) + greeneId = add_author(q, "Graham Greene", date(1904, 10, 2)) + pratchettId = add_author(q, "Terry Pratchett", date(1948, 4, 28)) check(q.prepare,INSERT_GENRE_SQL) sfiction = add_genre(q, "Science Fiction") diff --git a/sources/pyside2/libpyside/pyside.cpp b/sources/pyside2/libpyside/pyside.cpp index 9ee20f461..ffa837a01 100644 --- a/sources/pyside2/libpyside/pyside.cpp +++ b/sources/pyside2/libpyside/pyside.cpp @@ -147,7 +147,8 @@ bool fillQtProperties(PyObject *qObj, const QMetaObject *metaObj, PyObject *kwds return false; } if (!accept) { - PyErr_Format(PyExc_AttributeError, "'%S' is not a Qt property or a signal", key); + PyErr_Format(PyExc_AttributeError, "'%s' is not a Qt property or a signal", + propName.constData()); return false; } } |