Commit 2da1cd73 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

CI: Enable clang-tidy modernize-loop-convert

parent ea75c27a
Pipeline #13780 passed with stage
in 18 minutes and 49 seconds
......@@ -33,4 +33,4 @@ build_clang_tidy:
- ninja
# Fix the poppler header, remove when debian:unstable ships poppler 0.82 or later
- sed -i "N;N;N;N; s#class MediaRendition\;\nclass MovieAnnotation\;\nclass ScreenAnnotation;#class MediaRendition\;#g" /usr/include/poppler/qt5/poppler-link.h
- "run-clang-tidy -header-filter='.*/okular/.*' -checks='-*,performance-*,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace,-bugprone-macro-parentheses,-bugprone-narrowing-conversions,-bugprone-branch-clone,-bugprone-incorrect-roundings' -config=\"{WarningsAsErrors: '*'}\""
- "run-clang-tidy -header-filter='.*/okular/.*' -checks='-*,performance-*,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace,modernize-loop-convert,-bugprone-macro-parentheses,-bugprone-narrowing-conversions,-bugprone-branch-clone,-bugprone-incorrect-roundings' -config=\"{WarningsAsErrors: '*'}\""
......@@ -1198,8 +1198,8 @@ void TextAnnotationPrivate::transform( const QTransform &matrix )
{
AnnotationPrivate::transform( matrix );
for ( int i = 0; i < 3; ++i ) {
m_transformedInplaceCallout[i].transform( matrix );
for ( NormalizedPoint &np : m_transformedInplaceCallout ) {
np.transform( matrix );
}
}
......@@ -1207,8 +1207,8 @@ void TextAnnotationPrivate::baseTransform( const QTransform &matrix )
{
AnnotationPrivate::baseTransform( matrix );
for ( int i = 0; i < 3; ++i ) {
m_inplaceCallout[i].transform( matrix );
for ( NormalizedPoint &np : m_inplaceCallout ) {
np.transform( matrix );
}
}
......
......@@ -353,10 +353,10 @@ TextEntity::List Page::words( const RegularAreaRect * area, TextPage::TextAreaIn
else
ret = d->m_text->words( nullptr, b );
for (int i = 0; i < ret.length(); ++i)
for (auto &retI : ret)
{
const TextEntity * orig = ret[i];
ret[i] = new TextEntity( orig->text(), new Okular::NormalizedRect(orig->transformedArea ( d->rotationMatrix() )) );
const TextEntity * orig = retI;
retI = new TextEntity( orig->text(), new Okular::NormalizedRect(orig->transformedArea ( d->rotationMatrix() )) );
delete orig;
}
......
......@@ -94,12 +94,12 @@ static KJSObject printd( KJSContext *context, void *,
{
format = arguments.at( 0 ).toString( context ).replace( "tt", "ap" );
format.replace( "t", "a" );
for( int i = 0 ; i < format.size() ; ++i )
for( QChar &formatChar : format )
{
if( format[i] == 'M' )
format[i] = 'm';
else if( format[i] == 'm' )
format[i] = 'M';
if( formatChar == 'M' )
formatChar = 'm';
else if( formatChar == 'm' )
formatChar = 'M';
}
}
......
......@@ -1307,13 +1307,13 @@ QList< QPair<WordsWithCharacters, QRect> > makeAndSortLines(const WordsWithChara
const QRect elementArea = (*it).area().roundedGeometry(pageWidth,pageHeight);
bool found = false;
for( int i = 0 ; i < lines.length() ; i++)
for( QPair<WordsWithCharacters, QRect> &linesI : lines)
{
/* the line area which will be expanded
line_rects is only necessary to preserve the topmin and bottommax of all
the texts in the line, left and right is not necessary at all
*/
QRect &lineArea = lines[i].second;
QRect &lineArea = linesI.second;
const int text_y1 = elementArea.top() ,
text_y2 = elementArea.top() + elementArea.height() ,
text_x1 = elementArea.left(),
......@@ -1329,7 +1329,7 @@ QList< QPair<WordsWithCharacters, QRect> > makeAndSortLines(const WordsWithChara
*/
if(doesConsumeY(elementArea,lineArea,70))
{
WordsWithCharacters &line = lines[i].first;
WordsWithCharacters &line = linesI.first;
line.append(*it);
const int newLeft = line_x1 < text_x1 ? line_x1 : text_x1;
......@@ -1356,9 +1356,9 @@ QList< QPair<WordsWithCharacters, QRect> > makeAndSortLines(const WordsWithChara
}
// Step 3
for(int i = 0 ; i < lines.length() ; i++)
for(QPair<WordsWithCharacters, QRect> &line : lines)
{
WordsWithCharacters &list = lines[i].first;
WordsWithCharacters &list = line.first;
std::sort(list.begin(), list.end(), compareTinyTextEntityX);
}
......@@ -1424,9 +1424,9 @@ static void calculateStatisticalInformation(const QList<WordWithCharacters> &wor
QList<QRect> max_hor_space_rects;
// Space in every line
for(int i = 0 ; i < sortedLines.length() ; i++)
for(const QPair<WordsWithCharacters, QRect> &sortedLine : sortedLines)
{
const WordsWithCharacters list = sortedLines.at(i).first;
const WordsWithCharacters list = sortedLine.first;
QList<QRect> line_space_rects;
int maxSpace = 0, minSpace = pageWidth;
......@@ -1586,9 +1586,9 @@ static RegionTextList XYCutForBoundingBoxes(const QList<WordWithCharacters> &wor
int count;
// for every text in the region
for(int j = 0 ; j < list.length() ; ++j )
for( const WordWithCharacters &wwc : list )
{
TinyTextEntity *ent = list.at(j).word;
TinyTextEntity *ent = wwc.word;
const QRect entRect = ent->area.geometry(pageWidth, pageHeight);
// calculate vertical projection profile proj_on_xaxis1
......@@ -1759,9 +1759,8 @@ static RegionTextList XYCutForBoundingBoxes(const QList<WordWithCharacters> &wor
// horizontal cut, topRect and bottomRect
if(cut_hor)
{
for( int j = 0 ; j < list.length() ; ++j )
for( const WordWithCharacters &word : list )
{
const WordWithCharacters &word = list.at(j);
const QRect wordRect = word.area().geometry(pageWidth,pageHeight);
if(topRect.intersects(wordRect))
......@@ -1780,9 +1779,8 @@ static RegionTextList XYCutForBoundingBoxes(const QList<WordWithCharacters> &wor
//vertical cut, leftRect and rightRect
else if(cut_ver)
{
for( int j = 0 ; j < list.length() ; ++j )
for( const WordWithCharacters &word : list )
{
const WordWithCharacters &word = list.at(j);
const QRect wordRect = word.area().geometry(pageWidth,pageHeight);
if(leftRect.intersects(wordRect))
......@@ -1814,17 +1812,15 @@ WordsWithCharacters addNecessarySpace(RegionTextList tree, int pageWidth, int pa
*/
// Only change the texts under RegionTexts, not the area
for(int j = 0 ; j < tree.length() ; j++)
for(RegionText &tmpRegion : tree)
{
RegionText &tmpRegion = tree[j];
// Step 01
QList< QPair<WordsWithCharacters, QRect> > sortedLines = makeAndSortLines(tmpRegion.text(), pageWidth, pageHeight);
// Step 02
for(int i = 0 ; i < sortedLines.length() ; i++)
for(QPair<WordsWithCharacters, QRect> &sortedLine : sortedLines)
{
WordsWithCharacters &list = sortedLines[i].first;
WordsWithCharacters &list = sortedLine.first;
for(int k = 0 ; k < list.length() ; k++ )
{
const QRect area1 = list.at(k).area().roundedGeometry(pageWidth,pageHeight);
......@@ -1857,18 +1853,18 @@ WordsWithCharacters addNecessarySpace(RegionTextList tree, int pageWidth, int pa
}
WordsWithCharacters tmpList;
for(int i = 0 ; i < sortedLines.length() ; i++)
for(const QPair<WordsWithCharacters, QRect> &sortedLine : qAsConst(sortedLines))
{
tmpList += sortedLines.at(i).first;
tmpList += sortedLine.first;
}
tmpRegion.setText(tmpList);
}
// Step 03
WordsWithCharacters tmp;
for(int i = 0 ; i < tree.length() ; i++)
for(const RegionText &tmpRegion : qAsConst(tree))
{
tmp += tree.at(i).text();
tmp += tmpRegion.text();
}
return tmp;
}
......
......@@ -110,8 +110,8 @@ TilesManager::TilesManager( int pageNumber, int width, int height, Rotation rota
TilesManager::~TilesManager()
{
for ( int i = 0; i < 16; ++i )
d->deleteTiles( d->tiles[ i ] );
for ( const TileNode &tile : d->tiles )
d->deleteTiles( tile );
delete d;
}
......@@ -169,9 +169,9 @@ Rotation TilesManager::rotation() const
void TilesManager::markDirty()
{
for ( int i = 0; i < 16; ++i )
for ( TileNode &tile : d->tiles )
{
TilesManager::Private::markDirty( d->tiles[ i ] );
TilesManager::Private::markDirty( tile );
}
}
......@@ -217,9 +217,9 @@ void TilesManager::setPixmap( const QPixmap *pixmap, const NormalizedRect &rect,
d->requestRect = NormalizedRect();
}
for ( int i = 0; i < 16; ++i )
for ( TileNode &tile : d->tiles )
{
d->setPixmap( pixmap, rotatedRect, d->tiles[ i ], isPartialPixmap );
d->setPixmap( pixmap, rotatedRect, tile, isPartialPixmap );
}
}
......@@ -342,9 +342,9 @@ void TilesManager::Private::setPixmap( const QPixmap *pixmap, const NormalizedRe
bool TilesManager::hasPixmap( const NormalizedRect &rect )
{
NormalizedRect rotatedRect = fromRotatedRect( rect, d->rotation );
for ( int i = 0; i < 16; ++i )
for ( const TileNode &tile : qAsConst( d->tiles ) )
{
if ( !d->hasPixmap( rotatedRect, d->tiles[ i ] ) )
if ( !d->hasPixmap( rotatedRect, tile ) )
return false;
}
......@@ -378,9 +378,9 @@ QList<Tile> TilesManager::tilesAt( const NormalizedRect &rect, TileLeaf tileLeaf
QList<Tile> result;
NormalizedRect rotatedRect = fromRotatedRect( rect, d->rotation );
for ( int i = 0; i < 16; ++i )
for ( TileNode &tile : d->tiles )
{
d->tilesAt( rotatedRect, d->tiles[ i ], result, tileLeaf );
d->tilesAt( rotatedRect, tile, result, tileLeaf );
}
return result;
......@@ -467,9 +467,9 @@ qulonglong TilesManager::totalMemory() const
void TilesManager::cleanupPixmapMemory( qulonglong numberOfBytes, const NormalizedRect &visibleRect, int visiblePageNumber )
{
QList<TileNode*> rankedTiles;
for ( int i = 0; i < 16; ++i )
for ( TileNode &tile : d->tiles )
{
d->rankTiles( d->tiles[ i ], rankedTiles, visibleRect, visiblePageNumber );
d->rankTiles( tile, rankedTiles, visibleRect, visiblePageNumber );
}
std::sort(rankedTiles.begin(), rankedTiles.end(), rankedTilesLessThan);
......
......@@ -296,10 +296,10 @@ void ProtocolMSITS::listDir (const QUrl & url)
UDSEntry entry;
int striplength = filepath.length();
for ( int i = 0; i < listing.size(); i++ )
for ( const QString &iListing : qAsConst(listing) )
{
// Strip the directory name
QString ename = listing[i].mid (striplength);
const QString ename = iListing.mid (striplength);
if ( isDirectory ( ename ) )
app_dir(entry, ename);
......
......@@ -109,14 +109,14 @@ bool EBookSearch::generateIndex( EBook * ebookFile, QDataStream & stream )
connect( m_Index, SIGNAL( indexingProgress( int, const QString& ) ), this, SLOT( updateProgress( int, const QString& ) ) );
// Process the list of files in CHM archive and keep only HTML document files from there
for ( int i = 0; i < alldocuments.size(); i++ )
for ( const QUrl &allDocumentsI : qAsConst( alldocuments ) )
{
QString docpath = alldocuments[i].path();
const QString docpath = allDocumentsI.path();
if ( docpath.endsWith( ".html", Qt::CaseInsensitive )
|| docpath.endsWith( ".htm", Qt::CaseInsensitive )
|| docpath.endsWith( ".xhtml", Qt::CaseInsensitive ) )
documents.push_back( alldocuments[i] );
documents.push_back( allDocumentsI );
}
if ( !m_Index->makeIndex( documents, ebookFile ) )
......@@ -167,9 +167,9 @@ bool EBookSearch::searchQuery(const QString & query, QList< QUrl > * results, EB
SearchDataKeeper keeper;
QString term;
for ( int i = 0; i < query.length(); i++ )
for ( const QChar &iChar : query )
{
QChar ch = query[i].toLower();
const QChar ch = iChar.toLower();
// a quote either begins or ends the phrase
if ( ch == '"' )
......
......@@ -383,9 +383,8 @@ QList< QUrl > Index::query(const QStringList &terms, const QStringList &termSeq,
std::sort(termList.begin(), termList.end());
QVector<Document> minDocs = termList.takeFirst().documents;
for(QList<Term>::Iterator it = termList.begin(); it != termList.end(); ++it) {
Term *t = &(*it);
QVector<Document> docs = t->documents;
for(const Term &t : qAsConst(termList)) {
const QVector<Document> docs = t.documents;
for(QVector<Document>::Iterator minDoc_it = minDocs.begin(); minDoc_it != minDocs.end(); ) {
bool found = false;
for (QVector<Document>::ConstIterator doc_it = docs.constBegin(); doc_it != docs.constEnd(); ++doc_it ) {
......@@ -405,14 +404,14 @@ QList< QUrl > Index::query(const QStringList &terms, const QStringList &termSeq,
QList< QUrl > results;
std::sort(minDocs.begin(), minDocs.end());
if ( termSeq.isEmpty() ) {
for(QVector<Document>::Iterator it = minDocs.begin(); it != minDocs.end(); ++it)
results << docList.at((int)(*it).docNumber);
for(const Document &doc : qAsConst(minDocs))
results << docList.at((int)doc.docNumber);
return results;
}
QUrl fileName;
for(QVector<Document>::Iterator it = minDocs.begin(); it != minDocs.end(); ++it) {
fileName = docList[ (int)(*it).docNumber ];
for(const Document &doc : qAsConst(minDocs)) {
fileName = docList[ (int)doc.docNumber ];
if ( searchForPhrases( termSeq, seqWords, fileName, chmFile ) )
results << fileName;
}
......@@ -431,8 +430,8 @@ bool Index::searchForPhrases( const QStringList &phrases, const QStringList &wor
miniDict.clear();
// Initialize the dictionary with the words in phrase(s)
for ( QStringList::ConstIterator cIt = words.begin(); cIt != words.end(); ++cIt )
miniDict.insert( *cIt, new PosEntry( 0 ) );
for ( const QString &word : words )
miniDict.insert( word, new PosEntry( 0 ) );
// Fill the dictionary with the words from the document
unsigned int word_offset = 3;
......
......@@ -25,8 +25,8 @@ class TeXFont {
void setDisplayResolution()
{
for(unsigned int i=0; i<TeXFontDefinition::max_num_of_chars_in_font; i++)
glyphtable[i].shrunkenCharacter = QImage();
for(glyph &g : glyphtable)
g.shrunkenCharacter = QImage();
}
virtual glyph* getGlyph(quint16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black) = 0;
......
......@@ -83,8 +83,8 @@ TeXFont_PK::TeXFont_PK(TeXFontDefinition *parent)
qCDebug(OkularDviDebug) << "TeXFont_PK::TeXFont_PK( parent=" << parent << ")";
#endif
for(unsigned int i=0; i<TeXFontDefinition::max_num_of_chars_in_font; i++)
characterBitmaps[i] = nullptr;
for(auto &characterBitmap : characterBitmaps)
characterBitmap = nullptr;
file = fopen(QFile::encodeName(parent->filename).constData(), "r");
if (file == nullptr)
qCCritical(OkularDviDebug) << i18n("Cannot open font file %1.", parent->filename) << endl;
......@@ -104,9 +104,8 @@ TeXFont_PK::TeXFont_PK(TeXFontDefinition *parent)
TeXFont_PK::~TeXFont_PK()
{
//@@@ Release bitmaps
for(unsigned int i=0; i<TeXFontDefinition::max_num_of_chars_in_font; i++) {
delete characterBitmaps[i];
characterBitmaps[i] = nullptr;
for(bitmap *characterBitmap : characterBitmaps) {
delete characterBitmap;
}
if (file != nullptr) {
......
......@@ -63,8 +63,8 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
// Width table
fix_word widthTable_in_units_of_design_size[TeXFontDefinition::max_num_of_chars_in_font];
for(unsigned int i=0; i<TeXFontDefinition::max_num_of_chars_in_font; i++)
widthTable_in_units_of_design_size[i].value = 0;
for(fix_word &fw : widthTable_in_units_of_design_size)
fw.value = 0;
file.seek( 24 + 4*lh + 4*(ec-bc) );
for(unsigned int i=0; i<nw; i++) {
......@@ -81,8 +81,8 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
// Height table
fix_word heightTable_in_units_of_design_size[16];
for(unsigned int i=0; i<16; i++)
heightTable_in_units_of_design_size[i].value = 0;
for(fix_word &fw : heightTable_in_units_of_design_size)
fw.value = 0;
for(unsigned int i=0; i<nh; i++) {
stream >> heightTable_in_units_of_design_size[i].value;
}
......
......@@ -393,16 +393,14 @@ Okular::Annotation* createAnnotationFromPopplerAnnotation( Poppler::Annotation *
if ( annotation->subType() == Okular::Annotation::AHighlight )
{
Okular::HighlightAnnotation * hlann = static_cast<Okular::HighlightAnnotation*>( annotation );
QList<Okular::HighlightAnnotation::Quad> &quads = hlann->highlightQuads();
for (QList<Okular::HighlightAnnotation::Quad>::iterator it = quads.begin(); it != quads.end(); ++it)
for (Okular::HighlightAnnotation::Quad &quad : hlann->highlightQuads())
{
Okular::NormalizedPoint t;
t = it->point( 3 );
it->setPoint( it->point(0), 3 );
it->setPoint( t, 0 );
t = it->point( 2 );
it->setPoint( it->point(1), 2 );
it->setPoint( t, 1 );
const Okular::NormalizedPoint p3 = quad.point( 3 );
quad.setPoint( quad.point(0), 3 );
quad.setPoint( p3, 0 );
const Okular::NormalizedPoint p2 = quad.point( 2 );
quad.setPoint( quad.point(1), 2 );
quad.setPoint( p2, 1 );
}
}
......
......@@ -1316,7 +1316,7 @@ void XpsHandler::processEndElement( XpsRenderNode &node )
} else if (node.name == QLatin1String("ImageBrush.Transform")) {
node.data = node.getRequiredChildData( QStringLiteral("MatrixTransform") );
} else if (node.name == QLatin1String("LinearGradientBrush")) {
XpsRenderNode * gradients = node.findChild( QStringLiteral("LinearGradientBrush.GradientStops") );
const XpsRenderNode * gradients = node.findChild( QStringLiteral("LinearGradientBrush.GradientStops") );
if ( gradients && gradients->data.canConvert< QGradient * >() ) {
QPointF start = getPointFromString( node.attributes.value( QStringLiteral("StartPoint") ) );
QPointF end = getPointFromString( node.attributes.value( QStringLiteral("EndPoint") ) );
......@@ -1328,7 +1328,7 @@ void XpsHandler::processEndElement( XpsRenderNode &node )
delete qgrad;
}
} else if (node.name == QLatin1String("RadialGradientBrush")) {
XpsRenderNode * gradients = node.findChild( QStringLiteral("RadialGradientBrush.GradientStops") );
const XpsRenderNode * gradients = node.findChild( QStringLiteral("RadialGradientBrush.GradientStops") );
if ( gradients && gradients->data.canConvert< QGradient * >() ) {
QPointF center = getPointFromString( node.attributes.value( QStringLiteral("Center") ) );
QPointF origin = getPointFromString( node.attributes.value( QStringLiteral("GradientOrigin") ) );
......@@ -1854,9 +1854,7 @@ XpsDocument::XpsDocument(XpsFile *file, const QString &fileName): m_file(file),
XpsDocument::~XpsDocument()
{
for (int i = 0; i < m_pages.size(); i++) {
delete m_pages.at( i );
}
qDeleteAll(m_pages);
m_pages.clear();
if ( m_docStructure )
......@@ -2203,20 +2201,20 @@ bool XpsGenerator::print( QPrinter &printer )
return true;
}
XpsRenderNode * XpsRenderNode::findChild( const QString &name )
const XpsRenderNode * XpsRenderNode::findChild( const QString &name ) const
{
for (int i = 0; i < children.size(); i++) {
if (children[i].name == name) {
return &children[i];
for (const XpsRenderNode &child : children) {
if (child.name == name) {
return &child;
}
}
return nullptr;
}
QVariant XpsRenderNode::getRequiredChildData( const QString &name )
QVariant XpsRenderNode::getRequiredChildData( const QString &name ) const
{
XpsRenderNode * child = findChild( name );
const XpsRenderNode * child = findChild( name );
if (child == nullptr) {
qCWarning(OkularXpsDebug) << "Required element " << name << " is missing in " << this->name;
return QVariant();
......@@ -2225,9 +2223,9 @@ QVariant XpsRenderNode::getRequiredChildData( const QString &name )
return child->data;
}
QVariant XpsRenderNode::getChildData( const QString &name )
QVariant XpsRenderNode::getChildData( const QString &name ) const
{
XpsRenderNode * child = findChild( name );
const XpsRenderNode * child = findChild( name );
if (child == nullptr) {
return QVariant();
} else {
......
......@@ -58,9 +58,9 @@ public:
QXmlAttributes attributes;
QVariant data;
XpsRenderNode * findChild( const QString &name );
QVariant getRequiredChildData( const QString &name );
QVariant getChildData( const QString &name );
const XpsRenderNode * findChild( const QString &name ) const;
QVariant getRequiredChildData( const QString &name ) const;
QVariant getChildData( const QString &name ) const;
};
struct XpsGradient
......
......@@ -201,9 +201,9 @@ Shell::~Shell()
if( !m_tabs.empty() )
{
writeSettings();
for( QList<TabState>::iterator it = m_tabs.begin(); it != m_tabs.end(); ++it )
for( const TabState &tab : qAsConst( m_tabs ) )
{
it->part->closeUrl( false );
tab.part->closeUrl( false );
}
m_tabs.clear();
}
......@@ -390,9 +390,9 @@ void Shell::saveProperties(KConfigGroup &group)
// Gather lists of settings to preserve
QStringList urls;
for( int i = 0; i < m_tabs.size(); ++i )
for( const TabState &tab : qAsConst( m_tabs ) )
{
urls.append( m_tabs[i].part->url().url() );
urls.append( tab.part->url().url() );
}
group.writePathEntry( SESSION_URL_KEY, urls );
group.writeEntry( SESSION_TAB_KEY, m_tabWidget->currentIndex() );
......
......@@ -471,11 +471,12 @@ static bool isAuthorItem( const QModelIndex &index )
QItemSelection AuthorGroupProxyModel::mapSelectionToSource( const QItemSelection &selection ) const
{
QModelIndexList proxyIndexes = selection.indexes();
const QModelIndexList proxyIndexes = selection.indexes();
QItemSelection sourceSelection;
for ( int i = 0; i < proxyIndexes.size(); ++i ) {
if ( !isAuthorItem( proxyIndexes.at( i ) ) )
sourceSelection << QItemSelectionRange( mapToSource( proxyIndexes.at( i ) ) );
for ( const QModelIndex &proxyIndex : proxyIndexes ) {
if ( !isAuthorItem( proxyIndex ) ) {
sourceSelection << QItemSelectionRange( mapToSource( proxyIndex ) );
}
}
return sourceSelection;
......
......@@ -79,11 +79,8 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc)
}
}
for ( QStringList::Iterator it = orderedProperties.begin();
it != orderedProperties.end();
++it )
for ( const QString &key : qAsConst(orderedProperties) )
{
const QString key = *it;
const QString titleString = info.getKeyTitle( key );
const QString valueString = info.get( key );
if ( titleString.isNull() || valueString.isNull() )
......
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