some more whitespace changes

This commit is contained in:
hjk
2008-12-09 11:07:24 +01:00
parent 88b7a14a79
commit 342caa2141
90 changed files with 528 additions and 571 deletions

View File

@@ -126,7 +126,7 @@ void ContentsToolWindow::contentsDone()
{
m_widget->setCursor(QCursor(Qt::WaitCursor));
QList<QPair<QString, ContentList> > contentList = helpEngine->contents();
for(QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
for (QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
QTreeWidgetItem *newEntry;
QTreeWidgetItem *contentEntry;
QStack<QTreeWidgetItem*> stack;
@@ -135,7 +135,7 @@ void ContentsToolWindow::contentsDone()
bool root = false;
QTreeWidgetItem *lastItem[64];
for(int j = 0; j < 64; ++j)
for (int j = 0; j < 64; ++j)
lastItem[j] = 0;
ContentList lst = (*it).second;
@@ -149,19 +149,18 @@ void ContentsToolWindow::contentsDone()
stack.push(newEntry);
depth = 1;
root = true;
}
else{
if((item.depth > depth) && root) {
} else {
if (item.depth > depth && root) {
depth = item.depth;
stack.push(contentEntry);
}
if(item.depth == depth) {
if (item.depth == depth) {
contentEntry = new QTreeWidgetItem(stack.top(), lastItem[ depth ]);
lastItem[ depth ] = contentEntry;
contentEntry->setText(0, item.title);
contentEntry->setData(0, LinkRole, item.reference);
}
else if(item.depth < depth) {
else if (item.depth < depth) {
stack.pop();
depth--;
item = *(--it);

View File

@@ -296,7 +296,7 @@ quint32 HelpEngine::getFileAges()
QStringList::const_iterator i = addDocuFiles.begin();
quint32 fileAges = 0;
for(; i != addDocuFiles.end(); ++i) {
for (; i != addDocuFiles.end(); ++i) {
QFileInfo fi(*i);
if (fi.exists())
fileAges += fi.lastModified().toTime_t();
@@ -364,7 +364,7 @@ void TitleMapThread::run()
bool needRebuild = false;
if (Config::configuration()->profileName() == QLatin1String("default")) {
const QStringList docuFiles = Config::configuration()->docFiles();
for(QStringList::ConstIterator it = docuFiles.begin(); it != docuFiles.end(); it++) {
for (QStringList::ConstIterator it = docuFiles.begin(); it != docuFiles.end(); it++) {
if (!QFile::exists(*it)) {
Config::configuration()->saveProfile(Profile::createDefaultProfile());
Config::configuration()->loadDefaultProfile();
@@ -383,7 +383,7 @@ void TitleMapThread::run()
getAllContents();
titleMap.clear();
for(QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
for (QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
ContentList lst = (*it).second;
foreach (ContentItem item, lst) {
titleMap[item.reference] = item.title.trimmed();
@@ -430,7 +430,7 @@ void TitleMapThread::buildContentDict()
QStringList docuFiles = Config::configuration()->docFiles();
quint32 fileAges = 0;
for(QStringList::iterator it = docuFiles.begin(); it != docuFiles.end(); it++) {
for (QStringList::iterator it = docuFiles.begin(); it != docuFiles.end(); it++) {
QFile file(*it);
if (!file.exists()) {
#ifdef _SHOW_ERRORS_
@@ -441,7 +441,7 @@ void TitleMapThread::buildContentDict()
}
fileAges += QFileInfo(file).lastModified().toTime_t();
DocuParser *handler = DocuParser::createParser(*it);
if(!handler) {
if (!handler) {
#ifdef _SHOW_ERRORS_
emit errorOccured(tr("Documentation file %1 is not compatible!\n"
"Skipping file.").arg(QFileInfo(file).absoluteFilePath()));
@@ -450,7 +450,7 @@ void TitleMapThread::buildContentDict()
}
bool ok = handler->parse(&file);
file.close();
if(ok) {
if (ok) {
contentList += qMakePair(*it, QList<ContentItem>(handler->getContentItems()));
delete handler;
} else {
@@ -469,7 +469,7 @@ void TitleMapThread::buildContentDict()
if (contentOut.open(QFile::WriteOnly)) {
QDataStream s(&contentOut);
s << fileAges;
for(QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
for (QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
s << *it;
}
contentOut.close();
@@ -542,12 +542,12 @@ void IndexThread::buildKeywordDB()
QStringList::iterator i = addDocuFiles.begin();
int steps = 0;
for(; i != addDocuFiles.end(); i++)
for (; i != addDocuFiles.end(); i++)
steps += QFileInfo(*i).size();
QList<IndexKeyword> lst;
quint32 fileAges = 0;
for(i = addDocuFiles.begin(); i != addDocuFiles.end(); i++){
for (i = addDocuFiles.begin(); i != addDocuFiles.end(); i++) {
QFile file(*i);
if (!file.exists()) {
#ifdef _SHOW_ERRORS_
@@ -560,7 +560,7 @@ void IndexThread::buildKeywordDB()
DocuParser *handler = DocuParser::createParser(*i);
bool ok = handler->parse(&file);
file.close();
if(!ok){
if (!ok){
#ifdef _SHOW_ERRORS_
QString msg = QString::fromLatin1("In file %1:\n%2")
.arg(QFileInfo(file).absoluteFilePath())

View File

@@ -512,7 +512,7 @@ void HelpPlugin::activateContext()
// case 1 sidebar shown and has focus, we show whatever we have in the
// sidebar in big
RightPanePlaceHolder* placeHolder = RightPanePlaceHolder::current();
if(placeHolder && Core::RightPaneWidget::instance()->hasFocus()) {
if (placeHolder && Core::RightPaneWidget::instance()->hasFocus()) {
switchToHelpMode();
return;
}