summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-06-07 14:59:06 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-06-07 14:59:06 -0300
commit478c24d79795b34efb42c1ac29abd8fa777b9c90 (patch)
treef901f4af2463119b1c4c0ca5dff0150f81e5cd0e /qt-ui
parent24446f9c3ce3b48c59b2ceb212b7ac49eb6dbff7 (diff)
downloadsubsurface-478c24d79795b34efb42c1ac29abd8fa777b9c90.tar.gz
Removed the buttons on the Edit Dive computers.
This edit dive computers thing doesn't really need buttons anyway. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divecomputermanagementdialog.ui45
-rw-r--r--qt-ui/models.cpp2
2 files changed, 3 insertions, 44 deletions
diff --git a/qt-ui/divecomputermanagementdialog.ui b/qt-ui/divecomputermanagementdialog.ui
index abda9f5ce..6685e842e 100644
--- a/qt-ui/divecomputermanagementdialog.ui
+++ b/qt-ui/divecomputermanagementdialog.ui
@@ -17,51 +17,8 @@
<item>
<widget class="QTableView" name="tableView"/>
</item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
</layout>
</widget>
<resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>DiveComputerManagementDialog</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>248</x>
- <y>254</y>
- </hint>
- <hint type="destinationlabel">
- <x>157</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>DiveComputerManagementDialog</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>316</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel">
- <x>286</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <connections/>
</ui>
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 787dbd8cf..6cb1fa079 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -1198,10 +1198,12 @@ Qt::ItemFlags DiveComputerModel::flags(const QModelIndex& index) const
bool DiveComputerModel::setData(const QModelIndex& index, const QVariant& value, int role)
{
struct device_info *nnl = head_of_device_info_list();
+
for(int i = 0; i < index.row(); i++){
nnl = nnl->next;
}
QByteArray v = value.toByteArray();
nnl->nickname = strdup(v.data()); // how should I free this before setting a new one?
+ // set_dc_nickname(dive); -> should this be used instead?
}