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