libs: remove unused and redundant KVersionControlPlugin enums

icon-wise it shall be the same because there is no icon for unstaged added
files, changing the tint of modified files just to make it clearly
different from the added files

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-07-14 08:47:57 +03:00
parent 447b1fe699
commit f0a25101d2
3 changed files with 2 additions and 25 deletions

View file

@ -151,12 +151,9 @@ KVersionControlPlugin::ItemVersion FileViewGitPlugin::itemVersion(const KFileIte
kDebug() << "New file" << item; kDebug() << "New file" << item;
return KVersionControlPlugin::AddedVersion; return KVersionControlPlugin::AddedVersion;
} }
if (gitstatusflags & GIT_STATUS_INDEX_MODIFIED) { if (gitstatusflags & GIT_STATUS_INDEX_MODIFIED || gitstatusflags & GIT_STATUS_WT_MODIFIED) {
kDebug() << "Modified file" << item; kDebug() << "Modified file" << item;
return KVersionControlPlugin::LocallyModifiedVersion; return KVersionControlPlugin::LocallyModifiedVersion;
} else if (gitstatusflags & GIT_STATUS_WT_MODIFIED) {
kDebug() << "Modified unstaged file" << item;
return KVersionControlPlugin::LocallyModifiedUnstagedVersion;
} }
if (gitstatusflags & GIT_STATUS_INDEX_DELETED || gitstatusflags & GIT_STATUS_WT_DELETED) { if (gitstatusflags & GIT_STATUS_INDEX_DELETED || gitstatusflags & GIT_STATUS_WT_DELETED) {
kDebug() << "Deleted file" << item; kDebug() << "Deleted file" << item;

View file

@ -51,11 +51,9 @@ void DolphinFileItemListWidget::refreshCache()
// as tint colors and are mixed with the current set text color. The tint colors // as tint colors and are mixed with the current set text color. The tint colors
// have been optimized for the base colors of the corresponding Oxygen emblems. // have been optimized for the base colors of the corresponding Oxygen emblems.
switch (version) { switch (version) {
case KVersionControlPlugin::UpdateRequiredVersion: tintColor = Qt::yellow; break;
case KVersionControlPlugin::LocallyModifiedUnstagedVersion: tintColor = Qt::green; break;
case KVersionControlPlugin::LocallyModifiedVersion: tintColor = Qt::green; break;
case KVersionControlPlugin::AddedVersion: tintColor = Qt::green; break; case KVersionControlPlugin::AddedVersion: tintColor = Qt::green; break;
case KVersionControlPlugin::RemovedVersion: tintColor = Qt::darkRed; break; case KVersionControlPlugin::RemovedVersion: tintColor = Qt::darkRed; break;
case KVersionControlPlugin::LocallyModifiedVersion: tintColor = Qt::yellow; break;
case KVersionControlPlugin::ConflictingVersion: tintColor = Qt::red; break; case KVersionControlPlugin::ConflictingVersion: tintColor = Qt::red; break;
case KVersionControlPlugin::IgnoredVersion: tintColor = Qt::white; break; case KVersionControlPlugin::IgnoredVersion: tintColor = Qt::white; break;
case KVersionControlPlugin::NormalVersion: case KVersionControlPlugin::NormalVersion:
@ -95,15 +93,9 @@ QPixmap DolphinFileItemListWidget::overlayForState(KVersionControlPlugin::ItemVe
case KVersionControlPlugin::NormalVersion: case KVersionControlPlugin::NormalVersion:
iconName = "vcs-normal"; iconName = "vcs-normal";
break; break;
case KVersionControlPlugin::UpdateRequiredVersion:
iconName = "vcs-update-required";
break;
case KVersionControlPlugin::LocallyModifiedVersion: case KVersionControlPlugin::LocallyModifiedVersion:
iconName = "vcs-locally-modified"; iconName = "vcs-locally-modified";
break; break;
case KVersionControlPlugin::LocallyModifiedUnstagedVersion:
iconName = "vcs-locally-modified-unstaged";
break;
case KVersionControlPlugin::AddedVersion: case KVersionControlPlugin::AddedVersion:
iconName = "vcs-added"; iconName = "vcs-added";
break; break;

View file

@ -96,11 +96,6 @@ public:
* the latest version. * the latest version.
*/ */
NormalVersion, NormalVersion,
/**
* The file is under version control and a newer
* version exists on the main branch.
*/
UpdateRequiredVersion,
/** /**
* The file is under version control and has been * The file is under version control and has been
* modified locally. All modifications will be part * modified locally. All modifications will be part
@ -123,13 +118,6 @@ public:
* branch. * branch.
*/ */
ConflictingVersion, ConflictingVersion,
/**
* The file is under version control and has local
* modifications, which will not be part of the next
* commit (or are "unstaged" in git jargon).
* @since 4.6
*/
LocallyModifiedUnstagedVersion,
/** /**
* The file is not under version control and is listed * The file is not under version control and is listed
* in the ignore list of the version control system. * in the ignore list of the version control system.