X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fqt-console%2Fmediainfo%2Fmediainfo.cpp;h=2de3f2128d45eab621da612697118335b8d1c123;hb=143a5d11e207d0e14e25593045640c26ddb5d34c;hp=bedbcbb328290446fc7e90d7c898d5ca45233009;hpb=9fc0e57025773d59903785ecb9703af8c0d32421;p=bacula%2Fbacula diff --git a/bacula/src/qt-console/mediainfo/mediainfo.cpp b/bacula/src/qt-console/mediainfo/mediainfo.cpp index bedbcbb328..2de3f2128d 100644 --- a/bacula/src/qt-console/mediainfo/mediainfo.cpp +++ b/bacula/src/qt-console/mediainfo/mediainfo.cpp @@ -67,14 +67,14 @@ void MediaInfo::showInfoForJob(QTableWidgetItem * item) QTreeWidgetItem* pageSelectorTreeWidgetItem = mainWin->getFromHash(this); int row = item->row(); QString jobid = tableJob->item(row, 0)->text(); - Job *j=new Job(jobid, pageSelectorTreeWidgetItem); - connect(j, SIGNAL(destroyed()), this, SLOT(populateTree())); + new Job(jobid, pageSelectorTreeWidgetItem); +// connect(j, SIGNAL(destroyed()), this, SLOT(populateTree())); } void MediaInfo::pruneVol() { - prunePage* prune = new prunePage(m_mediaName, ""); - connect(prune, SIGNAL(destroyed()), this, SLOT(populateTree())); + new prunePage(m_mediaName, ""); +// connect(prune, SIGNAL(destroyed()), this, SLOT(populateTree())); } // TODO: use same functions as in medialist.cpp @@ -118,9 +118,8 @@ void MediaInfo::deleteVol() void MediaInfo::editVol() { - MediaEdit* edit = new MediaEdit(mainWin->getFromHash(this), - m_mediaId); - connect(edit, SIGNAL(destroyed()), this, SLOT(populateTree())); + new MediaEdit(mainWin->getFromHash(this), m_mediaId); +// connect(edit, SIGNAL(destroyed()), this, SLOT(populateTree())); } /* @@ -138,7 +137,8 @@ void MediaInfo::populateForm() "SELECT MediaId, VolumeName, Pool.Name, MediaType, FirstWritten," "LastWritten, VolMounts, VolBytes, Media.Enabled," "Location.Location, VolStatus, RecyclePool.Name, Media.Recycle, " - "VolReadTime, VolWriteTime, Media.VolUseDuration, Media.MaxVolJobs, " + "VolReadTime/1000000, VolWriteTime/1000000, Media.VolUseDuration, " + "Media.MaxVolJobs, " "Media.MaxVolFiles, Media.MaxVolBytes, Media.VolRetention,InChanger,Slot " "FROM Media JOIN Pool USING (PoolId) LEFT JOIN Pool AS RecyclePool " "ON (Media.RecyclePoolId = RecyclePool.PoolId) " @@ -254,15 +254,5 @@ void MediaInfo::populateForm() tableJob->verticalHeader()->hide(); /* make read only */ - int rcnt = tableJob->rowCount(); - int ccnt = tableJob->columnCount(); - for(int r=0; r < rcnt; r++) { - for(int c=0; c < ccnt; c++) { - QTableWidgetItem* item = tableJob->item(r, c); - if (item) { - item->setFlags(Qt::ItemFlags(item->flags() & (~Qt::ItemIsEditable))); - } - } - } - + tableJob->setEditTriggers(QAbstractItemView::NoEditTriggers); }