@@ -56,7 +56,7 @@ QLdd::QLdd(QString fileName, QString lddDirPath)
56
56
_otherMod.write = _fileInfo.permission (QFile::WriteOther);
57
57
_otherMod.execute = _fileInfo.permission (QFile::ExeOther);
58
58
59
- _tmCreate = _fileInfo.created ().toString (Qt::RFC2822Date);
59
+ _tmCreate = _fileInfo.birthTime ().toString (Qt::RFC2822Date);
60
60
_tmAccess = _fileInfo.lastRead ().toString (Qt::RFC2822Date);
61
61
_tmModify = _fileInfo.lastModified ().toString (Qt::RFC2822Date);
62
62
@@ -127,7 +127,7 @@ void QLdd::fillDependency(QTreeWidget &treeWidget) {
127
127
#ifdef __APPLE__
128
128
if (!flag) {
129
129
flag = true ;
130
- item->setTextColor (0 , Qt::magenta);
130
+ item->setForeground (0 , QBrush ( Qt::magenta) );
131
131
item->setText (0 , sl.first ());
132
132
} else {
133
133
item->setText (0 , " # " + sl.first ());
@@ -144,7 +144,7 @@ void QLdd::fillDependency(QTreeWidget &treeWidget) {
144
144
for (const QString &v : sl) {
145
145
if (!v.trimmed ().isEmpty ()) {
146
146
if (v.contains (" not found" )) {
147
- tmp-> setTextColor (0 , redC);
147
+ item-> setForeground (0 , QBrush ( redC) );
148
148
tmp->setText (0 , tmp->text (0 ) + " " + v);
149
149
tmp->setToolTip (0 , tmp->text (0 ));
150
150
} else {
@@ -177,12 +177,12 @@ void QLdd::fillExportTable(QListWidget &listWidget, const QString &filter) {
177
177
demangled.replace (" :__cxx11:" , " " );
178
178
demangled.replace (" std::basic_string<char, std::char_traits<char>, std::allocator<char> >" , " std::string" );
179
179
}
180
- QScopedPointer <QListWidgetItem> item (new QListWidgetItem (info.at (0 ) + " " + demangled));
180
+ std::unique_ptr <QListWidgetItem> item (new QListWidgetItem (info.at (0 ) + " " + demangled));
181
181
item->setToolTip (demangled);
182
182
if (!filter.isEmpty () && demangled.contains (filter, Qt::CaseInsensitive)) {
183
- listWidget.addItem (item.take ());
183
+ listWidget.addItem (item.release ());
184
184
} else if (filter.isEmpty ()) {
185
- listWidget.addItem (item.take ());
185
+ listWidget.addItem (item.release ());
186
186
}
187
187
});
188
188
}
0 commit comments