Changeset 6521 for trunk/qt-gui

Show
Ignore:
Timestamp:
09/13/08 22:59:51 (3 months ago)
Author:
flynd
Message:

Use strings instead of char* in onevent class so we don't need to keep track of what to deallocate.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt-gui/src/optionsdlg.cpp

    r6490 r6521  
    451451   chkOnEvents->setChecked(oem->CommandType() != ON_EVENT_IGNORE); 
    452452   oem->Lock(); 
    453    edtSndPlayer->setURL(oem->Command()); 
    454    edtSndMsg->setURL(oem->Parameter(ON_EVENT_MSG)); 
    455    edtSndUrl->setURL(oem->Parameter(ON_EVENT_URL)); 
    456    edtSndChat->setURL(oem->Parameter(ON_EVENT_CHAT)); 
    457    edtSndFile->setURL(oem->Parameter(ON_EVENT_FILE)); 
    458    edtSndNotify->setURL(oem->Parameter(ON_EVENT_NOTIFY)); 
    459    edtSndSysMsg->setURL(oem->Parameter(ON_EVENT_SYSMSG)); 
    460    edtSndMsgSent->setURL(oem->Parameter(ON_EVENT_MSGSENT)); 
     453   edtSndPlayer->setURL(oem->command()); 
     454   edtSndMsg->setURL(oem->parameter(ON_EVENT_MSG)); 
     455   edtSndUrl->setURL(oem->parameter(ON_EVENT_URL)); 
     456   edtSndChat->setURL(oem->parameter(ON_EVENT_CHAT)); 
     457   edtSndFile->setURL(oem->parameter(ON_EVENT_FILE)); 
     458   edtSndNotify->setURL(oem->parameter(ON_EVENT_NOTIFY)); 
     459   edtSndSysMsg->setURL(oem->parameter(ON_EVENT_SYSMSG)); 
     460   edtSndMsgSent->setURL(oem->parameter(ON_EVENT_MSGSENT)); 
    461461   oem->Unlock(); 
     462 
    462463   //TODO make general for all plugins 
    463464   ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
     
    709710  oem->SetCommandType(chkOnEvents->isChecked() ? ON_EVENT_RUN : ON_EVENT_IGNORE); 
    710711 
    711   QString txtSndPlayer = edtSndPlayer->url(); 
    712   QString txtSndMsg = edtSndMsg->url(); 
    713   QString txtSndUrl = edtSndUrl->url(); 
    714   QString txtSndChat = edtSndChat->url(); 
    715   QString txtSndFile = edtSndFile->url(); 
    716   QString txtSndNotify = edtSndNotify->url(); 
    717   QString txtSndSysMsg = edtSndSysMsg->url(); 
    718   QString txtSndMsgSent = edtSndMsgSent->url(); 
    719  
    720   const char *oemparams[8] = { txtSndMsg.latin1(), txtSndUrl.latin1(), 
    721    txtSndChat.latin1(), txtSndFile.latin1(), 
    722    txtSndNotify.latin1(), txtSndSysMsg.latin1(), 
    723    txtSndMsgSent.latin1(), 0 }; 
    724  
    725   oem->SetParameters(txtSndPlayer.latin1(), oemparams); 
     712  oem->setCommand(edtSndPlayer->url()); 
     713  oem->setParameter(ON_EVENT_MSG, edtSndMsg->url()); 
     714  oem->setParameter(ON_EVENT_URL, edtSndUrl->url()); 
     715  oem->setParameter(ON_EVENT_CHAT, edtSndChat->url()); 
     716  oem->setParameter(ON_EVENT_FILE, edtSndFile->url()); 
     717  oem->setParameter(ON_EVENT_NOTIFY, edtSndNotify->url()); 
     718  oem->setParameter(ON_EVENT_SYSMSG, edtSndSysMsg->url()); 
     719  oem->setParameter(ON_EVENT_MSGSENT, edtSndMsgSent->url()); 
     720 
    726721  //TODO Make general for all plugins 
    727722  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W);