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>
This commit is contained in:
Tomaz Canabrava 2013-06-07 14:59:06 -03:00
parent 24446f9c3c
commit 478c24d797
3 changed files with 4 additions and 44 deletions

View file

@ -157,6 +157,7 @@ const char *get_dc_nickname(const char *model, uint32_t deviceid)
void set_dc_nickname(struct dive *dive) void set_dc_nickname(struct dive *dive)
{ {
/* needs Qt implementation */ /* needs Qt implementation */
/*well, I don't know how to do this here... = ( */
} }
QString get_depth_string(depth_t depth, bool showunit) QString get_depth_string(depth_t depth, bool showunit)

View file

@ -17,51 +17,8 @@
<item> <item>
<widget class="QTableView" name="tableView"/> <widget class="QTableView" name="tableView"/>
</item> </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> </layout>
</widget> </widget>
<resources/> <resources/>
<connections> <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>
</ui> </ui>

View file

@ -1198,10 +1198,12 @@ Qt::ItemFlags DiveComputerModel::flags(const QModelIndex& index) const
bool DiveComputerModel::setData(const QModelIndex& index, const QVariant& value, int role) bool DiveComputerModel::setData(const QModelIndex& index, const QVariant& value, int role)
{ {
struct device_info *nnl = head_of_device_info_list(); struct device_info *nnl = head_of_device_info_list();
for(int i = 0; i < index.row(); i++){ for(int i = 0; i < index.row(); i++){
nnl = nnl->next; nnl = nnl->next;
} }
QByteArray v = value.toByteArray(); QByteArray v = value.toByteArray();
nnl->nickname = strdup(v.data()); // how should I free this before setting a new one? nnl->nickname = strdup(v.data()); // how should I free this before setting a new one?
// set_dc_nickname(dive); -> should this be used instead?
} }