Changeset 439 for trunk/src/gui/kernel/qdnd_pm.cpp
- Timestamp:
- Dec 25, 2009, 12:21:47 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qdnd_pm.cpp
r438 r439 57 57 #include "qt_os2.h" 58 58 59 #define QDND_DEBUG // in pair with qmime_pm.cpp 60 61 #ifdef QDND_DEBUG 62 # define DEBUG(a) qDebug a 63 #else 64 # define DEBUG(a) do {} while(0) 65 #endif 66 59 67 QT_BEGIN_NAMESPACE 60 68 … … 79 87 DRAGINFO *info() const { return di; } 80 88 81 bool provides( const char *format);82 const char *format( int fn);83 Q ByteArray encodedData( const char *format);89 bool hasFormat_sys(const QString &mimeType); 90 QStringList formats_sys(); 91 QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type); 84 92 85 93 private: … … 152 160 } 153 161 154 #if defined(QT_DEBUG_DND) 155 qDebug( "QPMDragData: %d drop workers for DRAGINFO %p", 156 workers.count(), di ); 157 #endif 162 DEBUG(() << "QPMDragData:" << workers.count() << "drop workers for DRAGINFO" << di); 158 163 159 164 // init all workers … … 182 187 di = NULL; 183 188 initialized = dropped = gotWorkers = FALSE; 189 } 190 191 bool QPMDragData::hasFormat_sys(const QString &mimeType) 192 { 193 return false; 194 } 195 196 QStringList QPMDragData::formats_sys() 197 { 198 return QStringList(); 199 } 200 201 QVariant QPMDragData::retrieveData_sys(const QString &mimeType, 202 QVariant::Type type) 203 { 204 QVariant result; 205 206 // we may only do data transfer after DM_DROP is sent. Return shortly. 207 if (!isDropped()) 208 return result; 209 210 return result; 184 211 } 185 212 … … 527 554 bool QDropData::hasFormat_sys(const QString &mimeType) const 528 555 { 529 // @todo implement 556 Q_ASSERT(d); 557 if (d) 558 return d->hasFormat_sys(mimeType); 530 559 return false; 531 560 } … … 534 563 { 535 564 QStringList fmts; 536 // @todo implement 565 Q_ASSERT(d); 566 if (d) 567 fmts = d->formats_sys(); 537 568 return fmts; 538 569 } … … 541 572 { 542 573 QVariant result; 543 // @todo implement 574 Q_ASSERT(d); 575 if (d) 576 result = d->retrieveData_sys(mimeType, type); 544 577 return result; 545 578 } … … 548 581 549 582 { 550 #ifdef QDND_DEBUG 551 qDebug("QDragManager::drag(QDrag *drag)"); 552 #endif 583 DEBUG(() << "QDragManager::drag"); 553 584 554 585 // @todo implement
Note:
See TracChangeset
for help on using the changeset viewer.