--- qsampler/trunk/src/qsamplerDeviceForm.cpp 2007/11/01 19:25:10 1466 +++ qsampler/trunk/src/qsamplerDeviceForm.cpp 2007/11/04 23:37:47 1470 @@ -57,17 +57,17 @@ adjustSize(); QObject::connect(ui.DeviceListView, - SIGNAL(selectionChanged()), + SIGNAL(itemSelectionChanged()), SLOT(selectDevice())); QObject::connect(ui.DeviceListView, - SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&,int)), - SLOT(contextMenu(QListViewItem*,const QPoint&,int))); + SIGNAL(customContextMenuRequested(const QPoint&)), + SLOT(deviceListViewContextMenu(const QPoint&))); QObject::connect(ui.RefreshDevicesPushButton, SIGNAL(clicked()), SLOT(refreshDevices())); QObject::connect(ui.DriverNameComboBox, - SIGNAL(activated(const QString&)), - SLOT(selectDriver(const QString&))); + SIGNAL(activated(const QString&)), + SLOT(selectDriver(const QString&))); QObject::connect(ui.DevicePortComboBox, SIGNAL(activated(int)), SLOT(selectDevicePort(int))); @@ -553,12 +553,16 @@ // Device list view context menu handler. -void DeviceForm::contextMenu ( QTreeWidgetItem* pItem, const QPoint& pos, int ) +void DeviceForm::deviceListViewContextMenu ( const QPoint& pos ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; + QTreeWidgetItem* pItem = ui.DeviceListView->itemAt(pos); + if (pItem == NULL) + return; + int iItemID; // Build the device context menu...