-
Notifications
You must be signed in to change notification settings - Fork 869
WIP #2802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
sdottaka
wants to merge
86
commits into
master
Choose a base branch
from
advanced-filter
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
WIP #2802
Changes from 83 commits
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
148cbfb
WIP
sdottaka 8c87119
WIP
sdottaka 82518af
WIP
sdottaka 1317e91
WIP
sdottaka 713c17f
WIP
sdottaka 2018e08
WIP
sdottaka c4b48f4
WIP
sdottaka 5a97bc3
WIPWIP
sdottaka 0e24960
WIP
sdottaka cf73d92
WIP
sdottaka ddd7f84
Merge branch 'master' into advanced-filter
sdottaka 7599486
WIP
sdottaka af138ed
WIP
sdottaka 3ddacfd
Merge branch 'master' into advanced-filter
sdottaka 618b354
WIP
sdottaka dc21d50
Merge branch 'master' into advanced-filter
sdottaka 6c6e8e3
WIP
sdottaka a11a9e9
WIP
sdottaka ad894e6
Merge branch 'master' into advanced-filter
sdottaka 3f09154
WIP
sdottaka f2194f7
WIP
sdottaka c12d5f3
WIP
sdottaka bcfc7b1
update boost to 1.88.0
sdottaka 7ab4edc
WIP
sdottaka 8a6aca1
WIP
sdottaka 8f4f9ef
Merge branch 'master' into advanced-filter
sdottaka 81d525c
WIP
sdottaka 6c2e41e
WIP
sdottaka a1d61f3
WIP
sdottaka 4711d4b
WIP
sdottaka fc0ec8c
Merge branch 'master' into advanced-filter
sdottaka 9e4d188
WIP
sdottaka 50eea72
WIP
sdottaka 648e9c1
WIP
sdottaka c30b26c
WIP
sdottaka 609fea0
WIP
sdottaka 5deece1
WIP
sdottaka df7732f
WIP
sdottaka 068042e
WIP
sdottaka c30a44d
Merge branch 'master' into advanced-filter
sdottaka 2e5cf6c
WIP
sdottaka d5a47ff
WIP
sdottaka 89dd7de
WIP
sdottaka f8951ab
WIP
sdottaka cd3f6ab
Potential fix for code scanning alert no. 1607: Poorly documented lar…
sdottaka 4a57220
Potential fix for code scanning alert no. 1566: Unused local variable
sdottaka d5d68c2
Potential fix for code scanning alert no. 1599: Poorly documented lar…
sdottaka c814e67
WIP
sdottaka 7742e89
WIP
sdottaka 436d15c
Potential fix for code scanning alert no. 1609: Catching by value
sdottaka 4609aed
WIP
sdottaka 8e344ad
WIP
sdottaka a8b75a4
WIP
sdottaka f267d65
Merge remote-tracking branch 'origin/master' into advanced-filter
sdottaka ce577bf
WIP
sdottaka 1aa8e43
WIP
sdottaka 7b28773
WIP
sdottaka e939e27
WIP
sdottaka 052ff60
WIP
sdottaka 9983b07
WIP
sdottaka 0920efb
WIP
sdottaka 909825e
Merge branch 'master' into advanced-filter
sdottaka 7da40ac
WIP
sdottaka 466f9aa
WIP
sdottaka b9e7c8e
WIP
sdottaka 641cdc9
WIP
sdottaka ac97ee8
Merge remote-tracking branch 'origin/master' into advanced-filter
sdottaka 2e2893e
WIP
sdottaka 8ed3855
WIP
sdottaka ab14656
WIP
sdottaka 5e9a809
WIP
sdottaka 0e51074
Merge branch 'master' into advanced-filter
sdottaka a6d596c
Merge branch 'master' into advanced-filter
sdottaka 6f2d1e1
WIP
sdottaka 8c11c20
WIP
sdottaka 0eb0fde
WIP
sdottaka c44da93
WIP
sdottaka 60bab0e
WIP
sdottaka 8863014
WIP
sdottaka ec32c39
WIP
sdottaka c954a15
WIP
sdottaka 0b34616
Merge branch 'master' into advanced-filter
sdottaka 5a77635
WIP
sdottaka 9ac323c
Merge branch 'master' into advanced-filter
sdottaka 1d7953f
WIP
sdottaka 6e7eec8
WIP
sdottaka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,20 +133,14 @@ static bool CheckFileForVersion(const String& ext) | |
void CDiffContext::UpdateVersion(DIFFITEM &di, int nIndex) const | ||
{ | ||
DiffFileInfo & dfi = di.diffFileInfo[nIndex]; | ||
// Check only binary files | ||
dfi.version.SetFileVersionNone(); | ||
|
||
if (di.diffcode.isDirectory()) | ||
if (!di.diffcode.exists(nIndex) || di.diffcode.isDirectory() || !CheckFileForVersion(paths::FindExtension(di.diffFileInfo[nIndex].filename))) | ||
{ | ||
dfi.version.SetFileVersionNone(); | ||
return; | ||
} | ||
|
||
String spath; | ||
if (!di.diffcode.exists(nIndex)) | ||
return; | ||
String ext = paths::FindExtension(di.diffFileInfo[nIndex].filename); | ||
if (!CheckFileForVersion(ext)) | ||
return; | ||
spath = di.getFilepath(nIndex, GetNormalizedPath(nIndex)); | ||
spath = paths::ConcatPath(spath, di.diffFileInfo[nIndex].filename); | ||
const String spath = paths::ConcatPath( | ||
di.getFilepath(nIndex, GetNormalizedPath(nIndex)), di.diffFileInfo[nIndex].filename); | ||
|
||
// Get version info if it exists | ||
CVersionInfo ver(spath.c_str()); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,7 +114,7 @@ void DIFFITEM::Swap(int idx1, int idx2) | |
|
||
void DIFFITEM::ClearAllAdditionalProperties() | ||
{ | ||
const int n = ((diffcode.diffcode & DIFFCODE::THREEWAY) != 0) ? 3 : 2; | ||
const int n = diffcode.isThreeway() ? 3 : 2; | ||
for (int i = 0; i < n; ++i) | ||
diffFileInfo[i].m_pAdditionalProperties.reset(); | ||
if (HasChildren()) | ||
|
@@ -223,7 +223,7 @@ void DIFFCODE::swap(int idx1, int idx2) | |
bool binflag2 = (diffcode & (BINSIDE1 << idx2)); | ||
Set(BINSIDE1 << idx1, binflag2 ? (BINSIDE1 << idx1) : 0); | ||
Set(BINSIDE1 << idx2, binflag1 ? (BINSIDE1 << idx2) : 0); | ||
if ((diffcode & THREEWAY) != 0) | ||
if (isThreeway()) | ||
{ | ||
int idx = -1; | ||
switch (diffcode & COMPAREFLAGS3WAY) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,7 +137,11 @@ struct DIFFCODE | |
} | ||
bool existAll() const | ||
{ | ||
return ((diffcode & DIFFCODE::THREEWAY) ? DIFFCODE::ALL : DIFFCODE::BOTH) == (diffcode & DIFFCODE::ALL); | ||
return (isThreeway() ? DIFFCODE::ALL : DIFFCODE::BOTH) == (diffcode & DIFFCODE::ALL); | ||
} | ||
bool isThreeway() const | ||
{ | ||
return (diffcode & DIFFCODE::THREEWAY) != 0; | ||
} | ||
|
||
// compare result | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1033,12 +1033,12 @@ int GetColImage(const DIFFITEM &di) | |
if (di.diffcode.isSideFirstOnly()) | ||
return (di.diffcode.isDirectory() ? DIFFIMG_LDIRUNIQUE : DIFFIMG_LUNIQUE); | ||
if (di.diffcode.isSideSecondOnly()) | ||
return ((di.diffcode.diffcode & DIFFCODE::THREEWAY) == 0 ? | ||
return (!di.diffcode.isThreeway() ? | ||
(di.diffcode.isDirectory() ? DIFFIMG_RDIRUNIQUE : DIFFIMG_RUNIQUE) : | ||
(di.diffcode.isDirectory() ? DIFFIMG_MDIRUNIQUE : DIFFIMG_MUNIQUE)); | ||
if (di.diffcode.isSideThirdOnly()) | ||
return (di.diffcode.isDirectory() ? DIFFIMG_RDIRUNIQUE : DIFFIMG_RUNIQUE); | ||
if ((di.diffcode.diffcode & DIFFCODE::THREEWAY) != 0) | ||
if (di.diffcode.isThreeway()) | ||
{ | ||
if (!di.diffcode.exists(0)) | ||
return (di.diffcode.isDirectory() ? DIFFIMG_LDIRMISSING : DIFFIMG_LMISSING); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ | |
#include "LineFiltersList.h" | ||
#include "SubstitutionFiltersList.h" | ||
#include "FileFilterHelper.h" | ||
#include "FilterErrorMessages.h" | ||
#include "DirActions.h" | ||
#include "DirScan.h" | ||
#include "MessageBoxDialog.h" | ||
|
@@ -246,7 +247,6 @@ void CDirDoc::InitDiffContext(CDiffContext *pCtxt) | |
if (m_pDirView) | ||
pCtxt->m_pPropertySystem.reset(new PropertySystem(m_pDirView->GetDirViewColItems()->GetAdditionalPropertyNames())); | ||
|
||
m_imgfileFilter.UseMask(true); | ||
m_imgfileFilter.SetMask(GetOptionsMgr()->GetString(OPT_CMP_IMG_FILEPATTERNS)); | ||
pCtxt->m_pImgfileFilter = &m_imgfileFilter; | ||
|
||
|
@@ -257,9 +257,21 @@ void CDirDoc::InitDiffContext(CDiffContext *pCtxt) | |
pGlobalFileFilter->ReloadUpdatedFilters(); | ||
m_fileHelper.CloneFrom(pGlobalFileFilter); | ||
pCtxt->m_piFilterGlobal = &m_fileHelper; | ||
pCtxt->m_piFilterGlobal->SetDiffContext(pCtxt); | ||
|
||
// All plugin management is done by our plugin manager | ||
pCtxt->m_piPluginInfos = GetOptionsMgr()->GetBool(OPT_PLUGINS_ENABLED) ? &m_pluginman : nullptr; | ||
|
||
CheckFilter(); | ||
} | ||
|
||
void CDirDoc::CheckFilter() | ||
{ | ||
for (const auto* error: m_pCtxt->m_piFilterGlobal->GetErrorList()) | ||
{ | ||
String msg = FormatFilterErrorSummary(*error); | ||
RootLogger::Error(msg); | ||
} | ||
} | ||
|
||
/** | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,6 +132,7 @@ class CDirDoc : public CDocument, public IMDITab, public IDirDoc | |
void InitDiffContext(CDiffContext *pCtxt); | ||
void LoadLineFilterList(CDiffContext *pCtxt); | ||
void LoadSubstitutionFiltersList(CDiffContext* pCtxt); | ||
void CheckFilter(); | ||
|
||
// Generated message map functions | ||
//{{AFX_MSG(CDirDoc) | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.