Commit 87023ed6 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

Qt 4: use QTreeWidget::selectedItems() instead of...

Qt 4: use QTreeWidget::selectedItems() instead of QTreeWidget::isItemSelected() because the latter does not work when called on the QTreeWidget::itemSelectionChanged() signal in Qt 4.4.0
parent a656fba9
......@@ -556,16 +556,3 @@ void FileListItem::setDirName(const QString& dirName)
setOpen(false);
}
}
#if QT_VERSION >= 0x040000
/**
* Check if QTreeWidgetItem is selected.
*
* @return true if selected.
*/
bool FileListItem::isSelected() const
{
const QTreeWidget* tree = treeWidget();
return tree && tree->isItemSelected(this);
}
#endif
......@@ -164,13 +164,6 @@ public:
bool isInSelection() { return m_selected; }
#if QT_VERSION >= 0x040000
/**
* Check if QTreeWidgetItem is selected.
*
* @return true if selected.
*/
bool isSelected() const;
/**
* Check if directory is open.
* @return true if open.
......
......@@ -2721,8 +2721,18 @@ void Kid3App::updateGuiControls()
int num_files_selected = 0;
bool tagV1Supported = false;
#if QT_VERSION >= 0x040000
QList<QTreeWidgetItem*> selItems = m_view->getFileList()->selectedItems();
#endif
while (mp3file != 0) {
if (mp3file->isSelected()) {
if (
#if QT_VERSION >= 0x040000
selItems.contains(mp3file)
#else
mp3file->isSelected()
#endif
) {
mp3file->setInSelection(true);
TaggedFile* taggedFile = mp3file->getFile();
if (taggedFile) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment