From 6d75dd0c6fd8f74449d25701de966ff627b7151b Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 9 Feb 2013 17:50:45 +0100 Subject: [PATCH] OP-834 added FIXME comment for bad Q_ASSERT around effective code and commented out a bunch of dead code (that dead code includes the suspicious Q_ASSERT uses) --- .../openpilotgcs/src/plugins/notify/notifytablemodel.cpp | 8 ++++++++ ground/openpilotgcs/src/plugins/notify/notifytablemodel.h | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/notify/notifytablemodel.cpp b/ground/openpilotgcs/src/plugins/notify/notifytablemodel.cpp index 7b3da6d31..edabe164f 100644 --- a/ground/openpilotgcs/src/plugins/notify/notifytablemodel.cpp +++ b/ground/openpilotgcs/src/plugins/notify/notifytablemodel.cpp @@ -174,13 +174,16 @@ Qt::DropActions NotifyTableModel::supportedDropActions() const return Qt::MoveAction; } +/* QStringList NotifyTableModel::mimeTypes() const { QStringList types; types << mime_type_notify_table; return types; } +*/ +/* bool NotifyTableModel::dropMimeData( const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex& parent) { @@ -225,8 +228,10 @@ bool NotifyTableModel::dropMimeData( const QMimeData * data, Qt::DropAction acti // addiional check in case dropping of multiple rows if(rows + direction > _list.size()) continue; + // FIXME: suspicious Q_ASSERT around effective code Q_ASSERT(insertRows(rows + direction, 1, QModelIndex())); _list.replace(rows + direction, item); + // FIXME: suspicious Q_ASSERT around effective code Q_ASSERT(removeRows(dragged, 1, QModelIndex())); if (direction == UP_DIRECTION) ++rows; @@ -237,7 +242,9 @@ bool NotifyTableModel::dropMimeData( const QMimeData * data, Qt::DropAction acti emit dataChanged(idxTopLeft, idxBotRight); return true; } +*/ +/* QMimeData* NotifyTableModel::mimeData(const QModelIndexList& indexes) const { QMimeData* mimeData = new QMimeData(); @@ -255,6 +262,7 @@ QMimeData* NotifyTableModel::mimeData(const QModelIndexList& indexes) const mimeData->setData(mime_type_notify_table, encodedData); return mimeData; } +*/ void NotifyTableModel::dropRows(int position, int count) const { diff --git a/ground/openpilotgcs/src/plugins/notify/notifytablemodel.h b/ground/openpilotgcs/src/plugins/notify/notifytablemodel.h index dd2e765bd..1242624db 100644 --- a/ground/openpilotgcs/src/plugins/notify/notifytablemodel.h +++ b/ground/openpilotgcs/src/plugins/notify/notifytablemodel.h @@ -61,11 +61,11 @@ public: return QAbstractItemModel::flags(index) | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled; } - QStringList mimeTypes() const; + //QStringList mimeTypes() const; Qt::DropActions supportedDropActions() const; - bool dropMimeData( const QMimeData * data, Qt::DropAction action, int row, - int column, const QModelIndex& parent); - QMimeData* mimeData(const QModelIndexList &indexes) const; + //bool dropMimeData( const QMimeData * data, Qt::DropAction action, int row, + // int column, const QModelIndex& parent); + //QMimeData* mimeData(const QModelIndexList &indexes) const; bool setData(const QModelIndex &index, const QVariant &value, int role);