QT sqlite conversion fix

- QByteArray will be stored as str in the db
This commit is contained in:
Peter Šurda 2018-02-06 23:55:41 +01:00
parent 66bed6c7d6
commit c6834093ee
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -33,6 +33,7 @@ from pyelliptic.openssl import OpenSSL
import textwrap
import debug
import random
from sqlite3 import register_adapter
import string
from datetime import datetime, timedelta
from helper_ackPayload import genAckPayload
@ -1328,6 +1329,10 @@ class MyForm(settingsmixin.SMainWindow):
self._player(soundFilename)
# Adapters and converters for QT <-> sqlite
def sqlInit(self):
register_adapter(QtCore.QByteArray, str)
# Try init the distro specific appindicator,
# for example the Ubuntu MessagingMenu
def indicatorInit(self):
@ -4396,6 +4401,7 @@ def run():
app.setStyleSheet("QStatusBar::item { border: 0px solid black }")
myapp = MyForm()
myapp.sqlInit()
myapp.appIndicatorInit(app)
myapp.indicatorInit()
myapp.notifierInit()