Symbian-Developers
The Official Developers Section => Symbian Software Development Discussions => The Developers Section => Qt Application Development => Topic started by: huellif on January 16, 2014, 12:42:44 am
-
Hello,
I wrote a little central repository wrapper for Qt based apps.
1. Preconditions:
a) in your .pro file:
- link against centralrepository via:
LIBS += -lcentralrepository
depending on the cenrep keys you're reading/writing you have to modify the capabilities of your app.
- add QCenRep.cpp to SOURCES +=
- add QCenRep.h to HEADERS +=
b) in your implementation include the wrapper via
#include "QCenRep.h"
2. How to use it:
- all calls are static
- to get a CenRep key's value use this format:
getCenrep(int iUID, int iKey);
getCenrep(QString iUID, QString iKey);
getCenrep(char *iUID, char *iKey);
it always will return a QString, you don't have to care about the original format (int or string). If the key doesn't exist you will get "Missing key!"
- to set a new value:
setCenrep(int iUID, int iKey, QString qValue);
setCenrep(int iUID, int iKey, const char *qValue);
setCenrep(QString iUID, QString iKey, QString qValue);
setCenrep(const char *iUID, const char *iKey, const char *qValue);
the type of the value (string or int) gets detected, you don't have to worry about it.
Example code:
get the current product improvment status:
qDebug() << QCenRep::getCenrep(0x2003e081, 0x1);
qDebug() << QCenRep::getCenrep(QString("0x2003e081"), QString("0x1"));
qDebug() << QCenRep::getCenrep("0x2003e081", "0x1");
disable product improvment:
QCenRep::setCenrep(0x2003e081, 0x1, QString("0"));
QCenRep::setCenrep(0x2003e081, 0x1, "0");
QCenRep::setCenrep(QString("0x2003e081"), QString("0x1"), QString("0"));
QCenRep::setCenrep("0x2003e081", "0x1", "0");
maybe something is buggy, doesn't work or causes problems I didn't test it very much and it's a bit old.
thanks faenil for his cenrep example code from:
https://github.com/faenil/i8910tuning/blob/master/i8910tuning.cpp
GitHub repo: https://github.com/huellif/QCenRep
-
:D
Nice share, mate. i'll test anything for you ;)
-
Would make that settings Qt App on DMF a whole lot more possible.
-
Thank you huellif ;)
Did you known how to change number mode from Hindi to Arabic?
I known it stored in 101F8780 and I try this but not worked :(
QCenRep::setCenrep("0x101f8780", "0x1", "0");
-
Thank you huellif ;)
Did you known how to change number mode from Hindi to Arabic?
I known it stored in 101F8780 and I try this but not worked :(
QCenRep::setCenrep("0x101f8780", "0x1", "0");
set 0x1 to 0 and 0x2 to 1
[via] (https://sites.google.com/site/i8910wizard/calendar/the-vmp-of-the-game/101f8780-txt)
Would make that settings Qt App on DMF a whole lot more possible.
project seems to be dead
-
set 0x1 to 0 and 0x2 to 1
[via] (https://sites.google.com/site/i8910wizard/calendar/the-vmp-of-the-game/101f8780-txt)
It's not work .. I test it on Nokia 700 Belle FP2 :(
-
seems like the old method has stopped working :-\
did you check the .txt in an arabic firmware?
-
Yes and there it's:
cenrep
version 1
[owner]
0x100058EC
[defaultmeta]
16777216
[platsec]
cap_rd=alwayspass cap_wr=WriteDeviceData
[Main]
0x1 int 0 16777216 cap_rd=alwayspass cap_wr=WriteDeviceData
0x2 int 0 16777216 cap_rd=alwayspass cap_wr=WriteDeviceData
-
did you add wtite devicedata to your app?
Use qDebug() << to get the current status of both entries.
-
did you add wtite devicedata to your app?
Use qDebug() << to get the current status of both entries.
Yes, The value saved but the number mode not changed !
-
sorry for delay, I did a little research but didn't found something useful