From 57e681930f6b4c7c311fc70a66317ef64dee4cb1 Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Fri, 30 Apr 2021 17:49:36 +0200 Subject: examples: use exec() instead of exec_() Change-Id: I07dd4339093be8fcc80e63a2ff0448e998356203 Reviewed-by: Friedemann Kleint --- examples/sql/books/createdb.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'examples/sql/books/createdb.py') diff --git a/examples/sql/books/createdb.py b/examples/sql/books/createdb.py index d1f624ae0..48784a88e 100644 --- a/examples/sql/books/createdb.py +++ b/examples/sql/books/createdb.py @@ -48,19 +48,19 @@ def add_book(q, title, year, authorId, genreId, rating): q.addBindValue(authorId) q.addBindValue(genreId) q.addBindValue(rating) - q.exec_() + q.exec() def add_genre(q, name): q.addBindValue(name) - q.exec_() + q.exec() return q.lastInsertId() def add_author(q, name, birthdate): q.addBindValue(name) q.addBindValue(str(birthdate)) - q.exec_() + q.exec() return q.lastInsertId() @@ -103,9 +103,9 @@ def init_db(): check(db.open) q = QSqlQuery() - check(q.exec_, BOOKS_SQL) - check(q.exec_, AUTHORS_SQL) - check(q.exec_, GENRES_SQL) + check(q.exec, BOOKS_SQL) + check(q.exec, AUTHORS_SQL) + check(q.exec, GENRES_SQL) check(q.prepare, INSERT_AUTHOR_SQL) asimovId = add_author(q, "Isaac Asimov", date(1920, 2, 1)) -- cgit v1.2.3