Ignore:
Timestamp:
Dec 2, 2009, 4:30:02 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

tools: Patched qdesigner to make it compile without Drag&Drop.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/designer/src/lib/shared/qdesigner_menubar.cpp

    r2 r372  
    328328    hideMenu(index);
    329329
     330
    330331    QDrag *drag = new QDrag(this);
    331332    drag->setPixmap(ActionRepositoryMimeData::actionDragPixmap(action));
    332333    drag->setMimeData(new ActionRepositoryMimeData(action, Qt::MoveAction));
     334
    333335
    334336    const int old_index = m_currentIndex;
    335337    m_currentIndex = -1;
    336338
     339
    337340    if (drag->start(Qt::MoveAction) == Qt::IgnoreAction) {
     341
     342
     343
    338344        InsertActionIntoCommand *cmd = new InsertActionIntoCommand(fw);
    339345        cmd->init(this, action, safeActionAt(index));
     
    629635void QDesignerMenuBar::dragEnterEvent(QDragEnterEvent *event)
    630636{
     637
    631638    const ActionRepositoryMimeData *d = qobject_cast<const ActionRepositoryMimeData*>(event->mimeData());
    632639    if (!d || d->actionList().empty()) {
     
    650657        break;
    651658    }
     659
    652660}
    653661
    654662void QDesignerMenuBar::dragMoveEvent(QDragMoveEvent *event)
    655663{
     664
    656665    const ActionRepositoryMimeData *d = qobject_cast<const ActionRepositoryMimeData*>(event->mimeData());
    657666    if (!d || d->actionList().empty()) {
     
    674683        break;
    675684    }
     685
    676686}
    677687
     
    687697    m_dragging = false;
    688698
     699
    689700    if (const ActionRepositoryMimeData *d = qobject_cast<const ActionRepositoryMimeData*>(event->mimeData())) {
    690701
     
    707718    }
    708719    event->ignore();
     720
    709721}
    710722
Note: See TracChangeset for help on using the changeset viewer.