Show
Ignore:
Timestamp:
05/01/03 10:55:35 (6 years ago)
Author:
emostar
Message:

Remove all the QT_PROTOCOL_PLUGIN and PROTOCOL_PLUGIN

Location:
branches/protocol_plugin_1_3_0/qt-gui/src
Files:
39 modified

Legend:

Unmodified
Added
Removed
  • branches/protocol_plugin_1_3_0/qt-gui/src/adduserdlg.cpp

    r3467 r3472  
    5050 
    5151    QBoxLayout *layUin = new QBoxLayout(frmUin, QBoxLayout::LeftToRight); 
    52 #ifdef QT_PROTOCOL_PLUGIN 
    53     lblUin = new QLabel(tr("New User Id:"), frmUin); 
     52    lblUin = new QLabel(tr("New User ID:"), frmUin); 
    5453    edtUin = new QLineEdit(frmUin); 
    55 #else 
    56   lblUin = new QLabel(tr("New User UIN:"), frmUin); 
    57   edtUin = new QLineEdit(frmUin); 
    58     edtUin->setValidator(new QIntValidator(10000, 2147483647, edtUin)); 
    59 #endif 
    6054    layUin->addWidget(lblUin); 
    6155    layUin->addWidget(edtUin); 
     
    9185void AddUserDlg::ok() 
    9286{ 
    93 #ifdef QT_PROTOCOL_PLUGIN 
    9487  QString strUser = edtUin->text().latin1(); 
    9588  if (!strUser.isEmpty()) 
     
    9790    //TODO Get protocol 
    9891    server->AddUserToList(strUser, LICQ_PPID); 
     92    //if (chkAlert->isChecked()) 
     93    //  server->icqAlertUser(strUser); 
    9994  } 
    100 #else 
    101    unsigned long nUin = edtUin->text().toULong(); 
    102    if (nUin != 0) 
    103    { 
    104      server->AddUserToList(nUin); 
    105      if (chkAlert->isChecked()) // alert the user they were added 
    106        server->icqAlertUser(nUin); 
    107    } 
    108 #endif 
    109    close(true); 
     95 
     96  close(true); 
    11097} 
    11198 
  • branches/protocol_plugin_1_3_0/qt-gui/src/authuserdlg.cpp

    r3467 r3472  
    3636#include "usercodec.h" 
    3737 
    38 #ifdef QT_PROTOCOL_PLUGIN 
    3938//TODO Add drop down list of avaiable protocols 
    4039AuthUserDlg::AuthUserDlg(CICQDaemon *s, const char *szId, unsigned long nPPID, 
     
    113112  show(); 
    114113} 
    115 #endif 
    116114 
    117115AuthUserDlg::AuthUserDlg(CICQDaemon *s, unsigned long nUin, bool bGrant, 
     
    197195    if (edtUin->text().isEmpty()) return; 
    198196    m_nUin = edtUin->text().toULong(); 
    199   }   
    200  
    201 #ifdef QT_PROTOCOL_PLUGIN 
     197  } 
     198 
    202199  if (m_szId == 0) m_szId = strdup(edtUin->text().latin1()); 
    203200 
     
    212209    close(true); 
    213210  } 
    214 #else 
    215   if (m_nUin) 
    216   { 
    217     QTextCodec *codec = UserCodec::codecForUIN(m_nUin); 
    218     if (m_bGrant) 
    219       server->icqAuthorizeGrant(m_nUin, codec->fromUnicode(mleResponse->text())); 
    220     else 
    221       server->icqAuthorizeRefuse(m_nUin, codec->fromUnicode(mleResponse->text())); 
    222     close(true); 
    223   } 
    224 #endif 
    225211} 
    226212 
  • branches/protocol_plugin_1_3_0/qt-gui/src/authuserdlg.h

    r3467 r3472  
    1818   AuthUserDlg (CICQDaemon *s, unsigned long nUin, bool bGrant, 
    1919      QWidget *parent = 0); 
    20 #ifdef QT_PROTOCOL_PLUGIN 
    2120   AuthUserDlg (CICQDaemon *s, const char *szId, unsigned long nPPID, 
    2221      bool bGrant, QWidget *parent = 0); 
    23 #endif 
    2422 
    2523protected: 
     
    3230 
    3331   unsigned long m_nUin; 
    34 #ifdef QT_PROTOCOL_PLUGIN 
    3532   char *m_szId; 
    3633   unsigned long m_nPPID; 
    37 #endif 
    3834 
    3935   bool m_bGrant; 
  • branches/protocol_plugin_1_3_0/qt-gui/src/awaymsgdlg.cpp

    r3467 r3472  
    220220// ----------------------------------------------------------------------------- 
    221221 
    222 #ifdef QT_PROTOCOL_PLUGIN 
    223222CustomAwayMsgDlg::CustomAwayMsgDlg(const char *szId, 
    224223    unsigned long nPPID, QWidget *parent) 
     
    279278  show(); 
    280279} 
    281 #endif 
    282280 
    283281CustomAwayMsgDlg::CustomAwayMsgDlg(unsigned long nUin, QWidget *parent) 
     
    353351    s.truncate(s.length()-1); 
    354352 
    355 #ifdef QT_PROTOCOL_PLUGIN 
    356353  ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_W); 
    357 #else 
    358   ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_W); 
    359 #endif 
    360354  if (u != NULL) 
    361355  { 
    362356    u->SetCustomAutoResponse(s.local8Bit()); 
    363357    gUserManager.DropUser(u); 
    364 #ifdef QT_PROTOCOL_PLUGIN 
    365358    CICQSignal sig(SIGNAL_UPDATExUSER, USER_BASIC, m_szId, m_nPPID); 
    366 #else 
    367     CICQSignal sig(SIGNAL_UPDATExUSER, USER_BASIC, m_nUin); 
    368 #endif 
    369359    gMainWindow->slot_updatedUser(&sig); 
    370360  } 
     
    375365void CustomAwayMsgDlg::slot_clear() 
    376366{ 
    377 #ifdef QT_PROTOCOL_PLUGIN 
    378367  ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_W); 
    379 #else 
    380   ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_W); 
    381 #endif 
    382368  if (u != NULL) 
    383369  { 
    384370    u->ClearCustomAutoResponse(); 
    385371    gUserManager.DropUser(u); 
    386 #ifdef QT_PROTOCOL_PLUGIN 
    387372    CICQSignal sig(SIGNAL_UPDATExUSER, USER_BASIC, m_szId, m_nPPID); 
    388 #else 
    389     CICQSignal sig(SIGNAL_UPDATExUSER, USER_BASIC, m_nUin); 
    390 #endif 
    391373    gMainWindow->slot_updatedUser(&sig); 
    392374  } 
  • branches/protocol_plugin_1_3_0/qt-gui/src/awaymsgdlg.h

    r3467 r3472  
    4343public: 
    4444  CustomAwayMsgDlg(unsigned long, QWidget *parent = 0); 
    45 #ifdef QT_PROTOCOL_PLUGIN 
    4645  CustomAwayMsgDlg(const char *, unsigned long, QWidget *parent = 0); 
    47 #endif 
    4846 
    4947protected: 
    5048  MLEditWrap *mleAwayMsg; 
    5149  unsigned long m_nUin; 
    52 #ifdef QT_PROTOCOL_PLUGIN 
    5350  char *m_szId; 
    5451  unsigned long m_nPPID; 
    55 #endif 
    5652 
    5753protected slots: 
  • branches/protocol_plugin_1_3_0/qt-gui/src/chatdlg.cpp

    r3467 r3472  
    110110// --------------------------------------------------------------------------- 
    111111 
    112 #ifdef QT_PROTOCOL_PLUGIN 
    113112ChatDlg::ChatDlg(const char *szId, unsigned long nPPID, CICQDaemon *daemon, 
    114113                 CMainWindow *m, QWidget *parent) 
     
    393392  show(); 
    394393} 
    395 #endif 
    396394 
    397395ChatDlg::ChatDlg(unsigned long _nUin, CICQDaemon *daemon, 
  • branches/protocol_plugin_1_3_0/qt-gui/src/chatdlg.h

    r3467 r3472  
    8585  ChatDlg(unsigned long _nUin, CICQDaemon *daemon, CMainWindow *m, 
    8686          QWidget *parent = 0); 
    87 #ifdef QT_PROTOCOL_PLUGIN 
    8887  ChatDlg(const char *szId, unsigned long nPPID, CICQDaemon *daemon, 
    8988          CMainWindow *m, QWidget *parent = 0); 
    90 #endif 
    9189  virtual ~ChatDlg(); 
    9290 
     
    9593 
    9694  unsigned short LocalPort(); 
    97 #ifdef QT_PROTOCOL_PLUGIN 
    9895  char *Id()  { return m_szId; } 
    9996  unsigned long PPID()  { return m_nPPID; } 
    100 #endif 
    10197  unsigned long Uin()  { return m_nUin; }; 
    10298 
     
    133129 
    134130  unsigned long m_nUin; 
    135 #ifdef QT_PROTOCOL_PLUGIN 
    136131  char *m_szId; 
    137132  unsigned long m_nPPID; 
    138 #endif 
    139133  QSocketNotifier *sn; 
    140134  bool m_bAudio; 
  • branches/protocol_plugin_1_3_0/qt-gui/src/ewidgets.cpp

    r3467 r3472  
    518518//- Message View Widget --------------------------------------------------------- 
    519519 
    520 #ifdef QT_PROTOCOL_PLUGIN 
    521520CMessageViewWidget::CMessageViewWidget(const char *szId, unsigned long nPPID, 
    522521  CMainWindow *m, QWidget* parent, const char * name) 
     
    543542    addMsg(newEventList[i]); 
    544543} 
    545 #endif 
    546544 
    547545CMessageViewWidget::CMessageViewWidget(unsigned long _nUin, CMainWindow *m, QWidget* parent, const char * name) 
     
    570568CMessageViewWidget::~CMessageViewWidget() 
    571569{ 
    572 #ifdef QT_PROTOCOL_PLUGIN 
    573570  if (m_szId) 
    574571    free(m_szId); 
    575 #endif 
    576572} 
    577573 
    578574void CMessageViewWidget::addMsg(ICQEvent * _e) 
    579575{ 
    580 #ifdef QT_PROTOCOL_PLUGIN 
    581   if (strcmp(_e->Id(), m_szId) == 0 && _e->PPID() == m_nPPID) 
    582 #else 
    583   if ( _e->Uin() == m_nUin && _e->UserEvent() ) 
    584 #endif 
     576  if (strcmp(_e->Id(), m_szId) == 0 && _e->PPID() == m_nPPID && 
     577    _e->UserEvent()) 
    585578    addMsg( _e->UserEvent() ); 
    586579} 
     
    596589 
    597590  { 
    598 #ifdef QT_PROTOCOL_PLUGIN 
    599591    ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_R); 
    600 #else 
    601     ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_R); 
    602 #endif 
    603592    if (u != NULL) 
    604593    { 
     
    612601  if (e->Direction() != D_RECEIVER) 
    613602  { 
    614 #ifdef QT_PROTOCOL_PLUING 
    615603    ICQOwner *o = gUserManager.FetchOwner(m_nPPID, LOCK_R); 
    616 #else 
    617     ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
    618 #endif 
    619604    if (o != NULL) 
    620605    { 
     
    689674#endif 
    690675      e->Direction() == D_RECEIVER && e->SubCommand() == ICQ_CMDxSUB_MSG) { 
    691 #ifdef QT_PROTOCOL_PLUGIN 
    692676    ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_R); 
    693 #else 
    694     ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_R ); 
    695 #endif 
    696677    if (u != NULL) { 
    697678       u->EventClearId(e->Id()); 
  • branches/protocol_plugin_1_3_0/qt-gui/src/ewidgets.h

    r3467 r3472  
    129129  Q_OBJECT 
    130130private: 
    131 #ifdef QT_PROTOCOL_PLUGIN 
    132131  char *m_szId; 
    133132  unsigned long m_nPPID; 
    134 #endif 
    135133  unsigned long m_nUin; 
    136134  CMainWindow *mainwin; 
    137135public: 
    138 #ifdef QT_PROTOCOL_PLUGIN 
    139136  CMessageViewWidget(const char *szId, unsigned long nPPID, 
    140137    CMainWindow *m, QWidget *parent = 0, const char *name = 0); 
    141 #endif 
    142138  CMessageViewWidget(unsigned long _nUin, CMainWindow *m, 
    143139             QWidget* parent=0, const char * name =0); 
  • branches/protocol_plugin_1_3_0/qt-gui/src/filedlg.cpp

    r3467 r3472  
    4848 
    4949//-----Constructor------------------------------------------------------------ 
    50 #ifdef QT_PROTOCOL_PLUGIN 
    5150CFileDlg::CFileDlg(const char *szId, unsigned long nPPID, CICQDaemon *daemon, 
    5251  QWidget* parent) 
     
    119118  hbox->setSpacing(8); 
    120119  lay->addMultiCellWidget(hbox, CR, CR, 0, 2); 
    121    
     120 
    122121  btnCancel = new QPushButton(tr("&Cancel Transfer"), hbox); 
    123122  btnCancel->setMinimumWidth(75); 
     
    140139} 
    141140 
    142 #endif 
    143141CFileDlg::CFileDlg(unsigned long _nUin, CICQDaemon *daemon, QWidget* parent) 
    144142  : QWidget(parent, "FileDialog", WDestructiveClose) 
     
    351349 
    352350  //TODO Fix this 
    353 #ifdef QT_PROTOCOL_PLUGIN 
    354351  QTextCodec *codec = UserCodec::codecForUIN(strtoul(m_szId, (char **)NULL, 10)); 
    355 #else 
    356   QTextCodec *codec = UserCodec::codecForUIN(m_nUin); 
    357 #endif 
    358352 
    359353  CFileTransferEvent *e = NULL; 
  • branches/protocol_plugin_1_3_0/qt-gui/src/filedlg.h

    r3467 r3472  
    2121public: 
    2222  CFileDlg(unsigned long _nUin, CICQDaemon *daemon, QWidget* parent = 0); 
    23 #ifdef QT_PROTOCOL_PLUGIN 
    2423  CFileDlg(const char *szId, unsigned long nPPID, CICQDaemon *daemon, 
    2524    QWidget *parent = 0); 
    26 #endif 
    2725  virtual ~CFileDlg(); 
    2826 
     
    3129 
    3230  unsigned short LocalPort(); 
    33 #ifdef QT_PROTOCOL_PLUGIN 
    3431  char *Id()  { return m_szId; } 
    3532  unsigned long PPID()  { return m_nPPID; } 
    36 #endif 
    3733  unsigned long Uin()  { return m_nUin; }; 
    3834 
     
    5551 
    5652   unsigned long m_nUin; 
    57 #ifdef QT_PROTOCOL_PLUGIN 
    5853   char *m_szId; 
    5954   unsigned long m_nPPID; 
    60 #endif 
    6155   CICQDaemon *licqDaemon; 
    6256   QSocketNotifier *sn; 
  • branches/protocol_plugin_1_3_0/qt-gui/src/forwarddlg.cpp

    r3467 r3472  
    4545  m_nEventType = e->SubCommand(); 
    4646  m_nUin = 0; 
    47 #ifdef QT_PROTOCOL_PLUGIN 
    4847  m_szId = 0; 
    4948  m_nPPID = 0; 
    50 #endif 
    5149 
    5250  QString t; 
     
    9997CForwardDlg::~CForwardDlg() 
    10098{ 
    101 #ifdef QT_PROTOCOL_PLUGIN 
    10299  if (m_szId) free(m_szId); 
    103 #endif 
    104100} 
    105101 
     
    107103void CForwardDlg::slot_ok() 
    108104{ 
    109 #ifdef QT_PROTOCOL_PLUGIN 
    110105  if (m_szId == 0) return; 
    111 #endif 
    112  
    113   if (m_nUin == 0) return; 
    114106 
    115107  switch(m_nEventType) 
     
    118110    { 
    119111      s1.prepend(tr("Forwarded message:\n")); 
    120 #ifdef QT_PROTOCOL_PLUGIN 
    121112      UserSendMsgEvent *e = new UserSendMsgEvent(gLicqDaemon, sigman, gMainWindow, m_szId, 
    122113        m_nPPID); 
    123 #else 
    124       UserSendMsgEvent* e = new UserSendMsgEvent(gLicqDaemon, sigman, gMainWindow, m_nUin); 
    125 #endif 
    126114      e->setText(s1); 
    127115      e->show(); 
     
    131119    { 
    132120      s1.prepend(tr("Forwarded URL:\n")); 
    133 #ifdef QT_PROTOCOL_PLUGIN 
    134121      UserSendUrlEvent *e = new UserSendUrlEvent(gLicqDaemon, sigman, gMainWindow, m_szId, 
    135122        m_nPPID); 
    136 #else 
    137       UserSendUrlEvent* e = new UserSendUrlEvent(gLicqDaemon, sigman, gMainWindow, m_nUin); 
    138 #endif 
    139123      e->setUrl(s2, s1); 
    140124      e->show(); 
     
    162146    return; 
    163147 
    164 #ifdef QT_PROTOCOL_PLUGIN 
    165148  if (text.length() == 0) return; 
    166149  m_szId = strdup(text.latin1()); 
    167150  m_nPPID = LICQ_PPID; //TODO dropevent needs the ppid 
    168 #endif 
    169   m_nUin = text.toULong(); 
    170   if (m_nUin == 0) return; 
    171151 
    172 #ifdef QT_PROTOCOL_PLUGIN 
    173152  ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_R); 
    174 #else 
    175   ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_R); 
    176 #endif 
    177153  edtUser->setText(QString::fromLocal8Bit(u->GetAlias()) + " (" + text + ")"); 
    178154  gUserManager.DropUser(u); 
  • branches/protocol_plugin_1_3_0/qt-gui/src/forwarddlg.h

    r3467 r3472  
    2525  CInfoField *edtUser; 
    2626  QPushButton *btnOk, *btnCancel; 
    27 #ifdef QT_PROTOCOL_PLUGIN 
    2827  char *m_szId; 
    2928  unsigned long m_nPPID; 
    30 #endif 
    3129  unsigned long m_nUin; 
    3230protected slots: 
  • branches/protocol_plugin_1_3_0/qt-gui/src/keyrequestdlg.cpp

    r3467 r3472  
    3434 
    3535// ----------------------------------------------------------------------------- 
    36 #ifdef QT_PROTOCOL_PLUGIN 
    3736KeyRequestDlg::KeyRequestDlg(CSignalManager* _sigman, const char *szId, 
    3837  unsigned long nPPID, QWidget *parent) 
     
    117116  show(); 
    118117} 
    119 #endif 
    120118 
    121119KeyRequestDlg::KeyRequestDlg(CSignalManager* _sigman, unsigned long nUin, QWidget *parent) 
     
    210208    icqEventTag = 0; 
    211209  } 
    212 #ifdef QT_PROTOCOL_PLUGIN 
    213210  if (m_szId) free(m_szId); 
    214 #endif 
    215211} 
    216212 
  • branches/protocol_plugin_1_3_0/qt-gui/src/keyrequestdlg.h

    r3467 r3472  
    3232public: 
    3333  KeyRequestDlg(CSignalManager *_sigman, unsigned long nUin, QWidget *parent = 0); 
    34 #ifdef QT_PROTOCOL_PLUGIN 
    3534  KeyRequestDlg(CSignalManager *_sigman, const char *szId, 
    3635    unsigned long nPPID, QWidget *parent = 0); 
    37 #endif 
    3836  virtual ~KeyRequestDlg(); 
    3937 
    4038protected: 
    4139  unsigned long m_nUin; 
    42 #ifdef QT_PROTOCOL_PLUGIN 
    4340  char *m_szId; 
    4441  unsigned long m_nPPID; 
    45 #endif 
    4642  QPushButton *btnSend, *btnCancel; 
    4743  QLabel *lblStatus; 
  • branches/protocol_plugin_1_3_0/qt-gui/src/mainwin.cpp

    r3467 r3472  
    264264  licqLogWindow = theLogWindow; 
    265265  positionChanges = 0; 
    266 #ifdef QT_PROTOCOL_PLUGIN 
    267266  m_szUserMenuId = 0; 
    268 #endif 
    269267 
    270268  // Overwrite Qt's event handler 
     
    602600   connect (licqSigMan, SIGNAL(signal_ui_message(unsigned long)), 
    603601            this, SLOT(slot_ui_message(unsigned long))); 
    604 #ifdef QT_PROTOCOL_PLUGIN 
    605602   connect (licqSigMan, SIGNAL(signal_ui_viewevent(const char *)), 
    606603            this, SLOT(slot_ui_viewevent(const char *))); 
    607604   connect (licqSigMan, SIGNAL(signal_protocolPlugin(unsigned long)), 
    608605            this, SLOT(slot_protocolPlugin(unsigned long))); 
    609 #endif 
    610606 
    611607   m_bInMiniMode = false; 
     
    654650   } 
    655651 
    656 #ifdef QT_PROTOCOL_PLUGIN 
    657652   m_nProtoNum = 0; 
    658 #endif 
    659653 
    660654#if QT_VERSION > 3 
     
    848842 
    849843//-----CMainWindow::CreateUserFloaty--------------------------------------------- 
    850 #ifdef QT_PROTOCOL_PLUGIN 
    851844void CMainWindow::CreateUserFloaty(const char *szId, unsigned long nPPID, 
    852845   unsigned short x, unsigned short y, unsigned short w) 
     
    876869