Commit 65ee1b6c authored by Robert Knight's avatar Robert Knight
Browse files

Add more common prefixes to abbreviate taken from a quick scan over my home dir.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=681400
parent c607f510
......@@ -74,6 +74,12 @@ QString ProcessInfo::format(const QString& input) const
return output;
}
const char* ProcessInfo::DefaultCommonDirNames[] =
{ "src" , "build" , "debug" , "release" ,
"bin" , "lib" , "tmp" , "doc" , "data" ,
"share" , "examples" , "icons" ,
"pics" , "plugins" , 0 };
QString ProcessInfo::formatShortDir(const QString& input) const
{
QString result;
......@@ -82,8 +88,13 @@ QString ProcessInfo::formatShortDir(const QString& input) const
// temporarily hard-coded
QSet<QString> commonDirNames;
commonDirNames << "src" << "build" << "bin"
<< "lib" << "tmp";
const char** defaultCommonNames = DefaultCommonDirNames;
while ( *defaultCommonNames != 0 )
{
commonDirNames << *defaultCommonNames;
++defaultCommonNames;
}
QListIterator<QString> iter(parts);
iter.toBack();
......
......@@ -265,6 +265,8 @@ private:
QVector<QString> _arguments;
QMap<QString,QString> _environment;
static const char* DefaultCommonDirNames[];
};
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment