diff --git a/frame/item/appitem.cpp b/frame/item/appitem.cpp index a4e64f51e..414493f58 100644 --- a/frame/item/appitem.cpp +++ b/frame/item/appitem.cpp @@ -112,7 +112,7 @@ AppItem::AppItem(const QDBusObjectPath &entry, QWidget *parent) m_swingEffectView(new QGraphicsView(this)), m_itemScene(new QGraphicsScene(this)), - m_draging(false), + m_dragging(false), m_appIcon(QPixmap()), @@ -237,7 +237,7 @@ void AppItem::paintEvent(QPaintEvent *e) { DockItem::paintEvent(e); - if (m_draging || (m_swingEffectView->isVisible() && DockDisplayMode != Fashion)) + if (m_dragging || (m_swingEffectView->isVisible() && DockDisplayMode != Fashion)) return; QPainter painter(this); @@ -471,7 +471,7 @@ const QString AppItem::contextMenu() const QWidget *AppItem::popupTips() { - if (m_draging) + if (m_dragging) return nullptr; if (!m_windowInfos.isEmpty()) @@ -488,7 +488,7 @@ QWidget *AppItem::popupTips() void AppItem::startDrag() { - m_draging = true; + m_dragging = true; update(); const QPixmap &dragPix = m_appIcon; @@ -506,7 +506,7 @@ void AppItem::startDrag() if (!drag->target()) m_itemEntryInter->RequestUndock(); - m_draging = false; + m_dragging = false; setVisible(true); update(); } diff --git a/frame/item/appitem.h b/frame/item/appitem.h index b4891c57a..176ff1100 100644 --- a/frame/item/appitem.h +++ b/frame/item/appitem.h @@ -96,7 +96,7 @@ private: QGraphicsScene *m_itemScene; QGraphicsItemAnimation m_itemAnimation; - bool m_draging; + bool m_dragging; bool m_active; WindowInfoMap m_windowInfos; QString m_id; diff --git a/frame/item/pluginsitem.cpp b/frame/item/pluginsitem.cpp index 99ad66b6d..d91a88052 100644 --- a/frame/item/pluginsitem.cpp +++ b/frame/item/pluginsitem.cpp @@ -40,7 +40,7 @@ PluginsItem::PluginsItem(PluginsItemInterface* const pluginInter, const QString m_pluginInter(pluginInter), m_centralWidget(m_pluginInter->itemWidget(itemKey)), m_itemKey(itemKey), - m_draging(false) + m_dragging(false) { qDebug() << "load plugins item: " << pluginInter->pluginName() << itemKey << m_centralWidget; @@ -153,7 +153,7 @@ void PluginsItem::mouseReleaseEvent(QMouseEvent *e) bool PluginsItem::eventFilter(QObject *o, QEvent *e) { - if (m_draging) + if (m_dragging) if (o == m_centralWidget && e->type() == QEvent::Paint) return true; @@ -187,7 +187,7 @@ void PluginsItem::startDrag() { const QPixmap pixmap = grab(); - m_draging = true; + m_dragging = true; update(); QMimeData *mime = new QMimeData; @@ -203,7 +203,7 @@ void PluginsItem::startDrag() Q_UNUSED(result); emit itemDropped(drag->target()); - m_draging = false; + m_dragging = false; setVisible(true); update(); } diff --git a/frame/item/pluginsitem.h b/frame/item/pluginsitem.h index f7246ad62..3f8d5f81c 100644 --- a/frame/item/pluginsitem.h +++ b/frame/item/pluginsitem.h @@ -69,7 +69,7 @@ private: PluginsItemInterface * const m_pluginInter; QWidget *m_centralWidget; const QString m_itemKey; - bool m_draging; + bool m_dragging; static QPoint MousePressPoint; }; diff --git a/frame/panel/mainpanel.cpp b/frame/panel/mainpanel.cpp index b4db626f2..5977a9280 100644 --- a/frame/panel/mainpanel.cpp +++ b/frame/panel/mainpanel.cpp @@ -25,7 +25,7 @@ #include #include -DockItem *MainPanel::DragingItem = nullptr; +DockItem *MainPanel::DraggingItem = nullptr; PlaceholderItem *MainPanel::RequestDockItem = nullptr; const char *RequestDockKey = "RequestDock"; @@ -197,11 +197,11 @@ void MainPanel::dragEnterEvent(QDragEnterEvent *e) if (dragSourceItem) { e->accept(); - if (DragingItem) - DragingItem->show(); + if (DraggingItem) + DraggingItem->show(); return; } else { - DragingItem = nullptr; + DraggingItem = nullptr; } if (!e->mimeData()->formats().contains(RequestDockKey)) @@ -223,16 +223,16 @@ void MainPanel::dragMoveEvent(QDragMoveEvent *e) // internal drag swap if (e->source()) { - if (dst == DragingItem) + if (dst == DraggingItem) return; - if (!DragingItem) + if (!DraggingItem) return; - if (m_itemController->itemIsInContainer(DragingItem)) + if (m_itemController->itemIsInContainer(DraggingItem)) return; - m_itemController->itemMove(DragingItem, dst); + m_itemController->itemMove(DraggingItem, dst); } else { - DragingItem = nullptr; + DraggingItem = nullptr; if (!RequestDockItem) { @@ -270,15 +270,15 @@ void MainPanel::dragLeaveEvent(QDragLeaveEvent *e) RequestDockItem = nullptr; } - if (DragingItem && DragingItem->itemType() != DockItem::Plugins) - DragingItem->hide(); + if (DraggingItem && DraggingItem->itemType() != DockItem::Plugins) + DraggingItem->hide(); } void MainPanel::dropEvent(QDropEvent *e) { Q_UNUSED(e) - DragingItem = nullptr; + DraggingItem = nullptr; if (RequestDockItem) { @@ -546,17 +546,17 @@ void MainPanel::itemMoved(DockItem *item, const int index) } /// -/// \brief MainPanel::itemDragStarted handle managed item draging +/// \brief MainPanel::itemDragStarted handle managed item dragging /// void MainPanel::itemDragStarted() { - DragingItem = qobject_cast(sender()); + DraggingItem = qobject_cast(sender()); - if (DragingItem->itemType() == DockItem::Plugins) + if (DraggingItem->itemType() == DockItem::Plugins) { - if (static_cast(DragingItem)->allowContainer()) + if (static_cast(DraggingItem)->allowContainer()) { - qobject_cast(DragingItem)->hidePopup(); + qobject_cast(DraggingItem)->hidePopup(); m_itemController->setDropping(true); } } @@ -565,7 +565,7 @@ void MainPanel::itemDragStarted() rect.setTopLeft(mapToGlobal(pos())); rect.setSize(size()); - DragingItem->setVisible(rect.contains(QCursor::pos())); + DraggingItem->setVisible(rect.contains(QCursor::pos())); } /// diff --git a/frame/panel/mainpanel.h b/frame/panel/mainpanel.h index 01c147cef..1b9017d3e 100644 --- a/frame/panel/mainpanel.h +++ b/frame/panel/mainpanel.h @@ -89,7 +89,7 @@ private: QTimer *m_itemAdjustTimer; DockItemController *m_itemController; - static DockItem *DragingItem; + static DockItem *DraggingItem; static PlaceholderItem *RequestDockItem; };