forked from qt-creator/qt-creator
		
	Fixes: Make git diff work for staged files, do not launch submit if file list empty, make file model read only, add conveniences
Details: Add a type data field to the git file model
This commit is contained in:
		@@ -130,6 +130,11 @@ static inline bool addStateFileSpecification(const QString &line, QList<CommitDa
 | 
			
		||||
    \endcode
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
bool CommitData::filesEmpty() const
 | 
			
		||||
{
 | 
			
		||||
    return stagedFiles.empty() && unstagedFiles.empty() && untrackedFiles.empty();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool CommitData::parseFilesFromStatus(const QString &output)
 | 
			
		||||
{
 | 
			
		||||
    enum State { None, CommitFiles, NotUpdatedFiles, UntrackedFiles };
 | 
			
		||||
@@ -183,7 +188,7 @@ bool CommitData::parseFilesFromStatus(const QString &output)
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return !stagedFiles.empty() || !unstagedFiles.empty() || !untrackedFiles.empty();
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Convert a spec pair list to a list of file names, optionally
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user