Hi guys,
 
I'm working on a db system for the library and so far I have mirrored the XML 
file system to a sqlite db.
 
the only thing is that i am passing the pointer of my DB object that I created 
in the main mixxx class, so i can be reused as need, and to eliminate opening 
the db every time it is needed.
 
It is currently defined as public in the mixxx class as:
 
Mixxx.h
 
public:
QSqlDatabase     m_pPrimaryDB;
 
and then initialized in mixxx.cpp as:
 
bool MixxxApp::createDbConnection();
 
Can the pro developers, create a pointer to the main MixxxAPP class so that we 
can use a pointer to access global variables/functions in class MixxxApp as an 
example:
 
bool DlgBpmTap::SetBpm() {
 
  if (bpm > 0) {
   // lets update the db with the new track value
     if (theApp->m_pPrimaryDB) // check if db is good
     {
       m_pSQLquery.prepare(theApp->m_pPrimaryDB, "update tablname....)
     }
  }
}
 
what do you guys think, can a guru implement this pointer to MixxxApp, as I 
have been failing miserilby, and it would extremely benificial and convinient 
for DB operations.
 
Thanks,
Johnny/DJgramps
 
 
_________________________________________________________________
Need to know now? Get instant answers with Windows Live Messenger.
http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_messenger_072008
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to