Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
f4487c4c
Commit
f4487c4c
authored
Mar 12, 2010
by
Friedemann Kleint
Browse files
VCS[git]: Cleaning a repositories: Uncheck pro.user files as well.
parent
93b156e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/vcsbase/cleandialog.cpp
View file @
f4487c4c
...
...
@@ -166,18 +166,20 @@ void CleanDialog::setFileList(const QString &workingDirectory, const QStringList
const
QIcon
fileIcon
=
style
->
standardIcon
(
QStyle
::
SP_FileIcon
);
const
QString
diffSuffix
=
QLatin1String
(
".diff"
);
const
QString
patchSuffix
=
QLatin1String
(
".patch"
);
const
QString
proUserSuffix
=
QLatin1String
(
".pro.user"
);
const
QChar
slash
=
QLatin1Char
(
'/'
);
// Do not initially check patches for deletion.
// Do not initially check patches
or 'pro.user' files
for deletion.
foreach
(
const
QString
&
fileName
,
l
)
{
const
QFileInfo
fi
(
workingDirectory
+
slash
+
fileName
);
const
bool
isDir
=
fi
.
isDir
();
QStandardItem
*
nameItem
=
new
QStandardItem
(
QDir
::
toNativeSeparators
(
fileName
));
nameItem
->
setFlags
(
Qt
::
ItemIsUserCheckable
|
Qt
::
ItemIsEnabled
);
nameItem
->
setIcon
(
isDir
?
folderIcon
:
fileIcon
);
const
bool
isPatch
=
!
isDir
&&
(
fileName
.
endsWith
(
diffSuffix
)
||
fileName
.
endsWith
(
patchSuffix
));
const
bool
saveFile
=
!
isDir
&&
(
fileName
.
endsWith
(
diffSuffix
)
||
fileName
.
endsWith
(
patchSuffix
)
||
fileName
.
endsWith
(
proUserSuffix
));
nameItem
->
setCheckable
(
true
);
nameItem
->
setCheckState
(
isPatch
?
Qt
::
Unchecked
:
Qt
::
Checked
);
nameItem
->
setCheckState
(
saveFile
?
Qt
::
Unchecked
:
Qt
::
Checked
);
nameItem
->
setData
(
QVariant
(
fi
.
absoluteFilePath
()),
fileNameRole
);
nameItem
->
setData
(
QVariant
(
isDir
),
isDirectoryRole
);
// Tooltip with size information
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment