|
|
@ -1067,10 +1067,10 @@ bool findParenthesesGroups( const TQString& s, TQStringList& sl )
|
|
|
|
sl.push_back( s.mid( startPos+1, i-startPos-1 ) );
|
|
|
|
sl.push_back( s.mid( startPos+1, i-startPos-1 ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return startPosStack.empty(); // false if tqparentheses don't match
|
|
|
|
return startPosStack.empty(); // false if parentheses don't match
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQString calcHistorySortKey( const TQString& keyOrder, TQRegExp& matchedRegExpr, const TQStringList& tqparenthesesGroupList )
|
|
|
|
TQString calcHistorySortKey( const TQString& keyOrder, TQRegExp& matchedRegExpr, const TQStringList& parenthesesGroupList )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQStringList keyOrderList = TQStringList::split(',', keyOrder );
|
|
|
|
TQStringList keyOrderList = TQStringList::split(',', keyOrder );
|
|
|
|
TQString key;
|
|
|
|
TQString key;
|
|
|
@ -1080,7 +1080,7 @@ TQString calcHistorySortKey( const TQString& keyOrder, TQRegExp& matchedRegExpr,
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
bool bOk=false;
|
|
|
|
bool bOk=false;
|
|
|
|
int groupIdx = (*keyIt).toInt(&bOk);
|
|
|
|
int groupIdx = (*keyIt).toInt(&bOk);
|
|
|
|
if (!bOk || groupIdx<0 || groupIdx >(int)tqparenthesesGroupList.size() )
|
|
|
|
if (!bOk || groupIdx<0 || groupIdx >(int)parenthesesGroupList.size() )
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
TQString s = matchedRegExpr.cap( groupIdx );
|
|
|
|
TQString s = matchedRegExpr.cap( groupIdx );
|
|
|
|
if ( groupIdx == 0 )
|
|
|
|
if ( groupIdx == 0 )
|
|
|
@ -1089,7 +1089,7 @@ TQString calcHistorySortKey( const TQString& keyOrder, TQRegExp& matchedRegExpr,
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQString groupRegExp = tqparenthesesGroupList[groupIdx-1];
|
|
|
|
TQString groupRegExp = parenthesesGroupList[groupIdx-1];
|
|
|
|
if( groupRegExp.tqfind('|')<0 || groupRegExp.tqfind('(')>=0 )
|
|
|
|
if( groupRegExp.tqfind('|')<0 || groupRegExp.tqfind('(')>=0 )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool bOk = false;
|
|
|
|
bool bOk = false;
|
|
|
@ -1137,8 +1137,8 @@ void MergeResultWindow::collectHistoryInformation(
|
|
|
|
TQRegExp historyStart = m_pOptionDialog->m_historyStartRegExp;
|
|
|
|
TQRegExp historyStart = m_pOptionDialog->m_historyStartRegExp;
|
|
|
|
++id3l; // Skip line with "$Log ... $"
|
|
|
|
++id3l; // Skip line with "$Log ... $"
|
|
|
|
TQRegExp newHistoryEntry = m_pOptionDialog->m_historyEntryStartRegExp;
|
|
|
|
TQRegExp newHistoryEntry = m_pOptionDialog->m_historyEntryStartRegExp;
|
|
|
|
TQStringList tqparenthesesGroups;
|
|
|
|
TQStringList parenthesesGroups;
|
|
|
|
findParenthesesGroups( m_pOptionDialog->m_historyEntryStartRegExp, tqparenthesesGroups );
|
|
|
|
findParenthesesGroups( m_pOptionDialog->m_historyEntryStartRegExp, parenthesesGroups );
|
|
|
|
TQString key;
|
|
|
|
TQString key;
|
|
|
|
MergeEditLineList melList;
|
|
|
|
MergeEditLineList melList;
|
|
|
|
bool bPrevLineIsEmpty = true;
|
|
|
|
bool bPrevLineIsEmpty = true;
|
|
|
@ -1171,7 +1171,7 @@ void MergeResultWindow::collectHistoryInformation(
|
|
|
|
if ( ! bUseRegExp )
|
|
|
|
if ( ! bUseRegExp )
|
|
|
|
key = sLine;
|
|
|
|
key = sLine;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
key = calcHistorySortKey(m_pOptionDialog->m_historyEntryStartSortKeyOrder,newHistoryEntry,tqparenthesesGroups);
|
|
|
|
key = calcHistorySortKey(m_pOptionDialog->m_historyEntryStartSortKeyOrder,newHistoryEntry,parenthesesGroups);
|
|
|
|
|
|
|
|
|
|
|
|
melList.clear();
|
|
|
|
melList.clear();
|
|
|
|
melList.push_back( MergeEditLine(id3l,src) );
|
|
|
|
melList.push_back( MergeEditLine(id3l,src) );
|
|
|
|