QT sqlite conversion fix
- QByteArray will be stored as str in the db
This commit is contained in:
parent
66bed6c7d6
commit
c6834093ee
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user