[KPhotoAlbum] Patch to use the right database driver
Robert Krawitz
rlk at alum.mit.edu
Sun Jan 7 00:14:02 GMT 2018
It appears that at least with the latest Qt that we need to specify
the QSQLITE3 driver; QSQLITE uses the sqlite2 driver, which crashes
when it tries to open an sqlite3 database.
diff --git a/Exif/Database.cpp b/Exif/Database.cpp
index 237fa931..514978c1 100644
--- a/Exif/Database.cpp
+++ b/Exif/Database.cpp
@@ -115,7 +115,7 @@ static void showError( QSqlQuery& query )
Exif::Database::Database()
: m_isOpen(false)
{
- m_db = QSqlDatabase::addDatabase( QString::fromLatin1( "QSQLITE" ), QString::fromLatin1( "exif" ) );
+ m_db = QSqlDatabase::addDatabase( QString::fromLatin1( "QSQLITE3" ), QString::fromLatin1( "exif" ) );
}
@@ -370,7 +370,7 @@ bool Exif::Database::isAvailable()
#ifdef QT_NO_SQL
return false;
#else
- return QSqlDatabase::isDriverAvailable( QString::fromLatin1( "QSQLITE" ) );
+ return QSqlDatabase::isDriverAvailable( QString::fromLatin1( "QSQLITE3" ) );
#endif
}
--
Robert Krawitz <rlk at alum.mit.edu>
*** MIT Engineers A Proud Tradition http://mitathletics.com ***
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
More information about the Kphotoalbum
mailing list