forked from qt-creator/qt-creator
Beautifier: Add const wherever applicable
Change-Id: Iba3e5793bfd0e4057074e2b04e6353ba09aa4a5f Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
committed by
David Schulz
parent
f06482ca7f
commit
e7789de28c
@@ -142,7 +142,7 @@ QString BeautifierPlugin::format(const QString &text, const Command &command,
|
||||
switch (command.processing()) {
|
||||
case Command::FileProcessing: {
|
||||
// Save text to temporary file
|
||||
QFileInfo fi(fileName);
|
||||
const QFileInfo fi(fileName);
|
||||
Utils::TempFileSaver sourceFile(QDir::tempPath() + QLatin1String("/qtc_beautifier_XXXXXXXX.")
|
||||
+ fi.suffix());
|
||||
sourceFile.setAutoRemove(true);
|
||||
@@ -396,7 +396,7 @@ void BeautifierPlugin::formatCurrentFileContinue(QObject *watcher)
|
||||
// Restore folded blocks
|
||||
const QTextDocument *doc = textEditor->document();
|
||||
foreach (const int blockId, foldedBlocks) {
|
||||
QTextBlock block = doc->findBlockByNumber(qMax(0, blockId));
|
||||
const QTextBlock block = doc->findBlockByNumber(qMax(0, blockId));
|
||||
if (block.isValid())
|
||||
TextDocumentLayout::doFoldOrUnfold(block, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user