more file cosmetics

This commit is contained in:
hjk
2008-12-02 15:08:31 +01:00
parent 2ef79dca1c
commit df7aacd637
209 changed files with 895 additions and 689 deletions

View File

@@ -30,7 +30,9 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "basetextfind.h"
#include <QtGui/QTextBlock>
using namespace Find;

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef BASETEXTFIND_H
#define BASETEXTFIND_H

View File

@@ -30,7 +30,9 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "currentdocumentfind.h"
#include <aggregation/aggregate.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/modemanager.h>

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef CURRENTDOCUMENTFIND_H
#define CURRENTDOCUMENTFIND_H

View File

@@ -30,19 +30,6 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
/****************************************************************************
**
** Copyright (C) 1992-$THISYEAR$ Trolltech AS. All rights reserved.
**
** This file is part of the $MODULE$ of the Qt Toolkit.
**
** $LICENSE$
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/
#ifndef FIND_GLOBAL_H
#define FIND_GLOBAL_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef FINDPLUGIN_H
#define FINDPLUGIN_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "findtoolbar.h"
#include "findplugin.h"
#include "textfindconstants.h"

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef FINDTOOLBAR_H
#define FINDTOOLBAR_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "findtoolwindow.h"
#include "findplugin.h"

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef FINDTOOLWINDOW_H
#define FINDTOOLWINDOW_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef IFINDFILTER_H
#define IFINDFILTER_H

View File

@@ -30,10 +30,12 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef IFINDSUPPORT_H
#define IFINDSUPPORT_H
#include "find_global.h"
#include <QtGui/QTextDocument>
namespace Find {
@@ -69,7 +71,7 @@ signals:
};
inline void IFindSupport::highlightAll(const QString &, QTextDocument::FindFlags){}
inline void IFindSupport::highlightAll(const QString &, QTextDocument::FindFlags) {}
} // namespace Find

View File

@@ -30,32 +30,30 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "searchresulttreeitemdelegate.h"
#include "searchresulttreeitemroles.h"
#include <math.h>
#include <QModelIndex>
#include <QTextDocument>
#include <QPainter>
#include <QAbstractTextDocumentLayout>
#include <QApplication>
#include <math.h>
using namespace Find::Internal;
SearchResultTreeItemDelegate::SearchResultTreeItemDelegate(QObject *parent)
: QItemDelegate(parent)
: QItemDelegate(parent)
{
}
void SearchResultTreeItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
if (index.model()->data(index, ItemDataRoles::TypeRole).toString().compare("file") == 0)
{
if (index.model()->data(index, ItemDataRoles::TypeRole).toString().compare("file") == 0) {
QItemDelegate::paint(painter, option, index);
}
else
{
} else {
painter->save();
QStyleOptionViewItemV3 opt = setOptions(index, option);

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef SEARCHRESULTTREEITEMDELEGATE_H
#define SEARCHRESULTTREEITEMDELEGATE_H
@@ -51,7 +52,7 @@ private:
static const int m_minimumLineNumberDigits = 6;
};
} //Internal
} //Find
} // namespace Internal
} // namespace Find
#endif
#endif // SEARCHRESULTTREEITEMDELEGATE_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef SEARCHRESULTTREEITEMROLES_H
#define SEARCHRESULTTREEITEMROLES_H
@@ -50,8 +51,8 @@ enum roles
RowOfItem // The ?-th child of its parent is this this item
};
} //Internal
} //Find
} //itemDataRoles
} // namespace Internal
} // namespace Find
} // namespace itemDataRoles
#endif
#endif // SEARCHRESULTTREEITEMROLES_H

View File

@@ -30,13 +30,13 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "searchresulttreeitems.h"
using namespace Find::Internal;
SearchResultTreeItem::SearchResultTreeItem(SearchResultTreeItem::itemType type, const SearchResultTreeItem *parent)
: m_type(type)
, m_parent(parent)
: m_type(type), m_parent(parent)
{
}
@@ -118,8 +118,7 @@ int SearchResultTextRow::searchTermLength() const
}
SearchResultFile::SearchResultFile(const QString &fileName, const SearchResultTreeItem *parent)
: SearchResultTreeItem(resultFile, parent)
, m_fileName(fileName)
: SearchResultTreeItem(resultFile, parent), m_fileName(fileName)
{
}

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef SEARCHRESULTTREEITEMS_H
#define SEARCHRESULTTREEITEMS_H
@@ -55,13 +56,13 @@ public:
SearchResultTreeItem(itemType type = root, const SearchResultTreeItem *parent = NULL);
virtual ~SearchResultTreeItem();
itemType getItemType(void) const;
const SearchResultTreeItem *getParent(void) const;
itemType getItemType() const;
const SearchResultTreeItem *getParent() const;
const SearchResultTreeItem *getChild(int index) const;
void appendChild(SearchResultTreeItem *child);
int getChildrenCount(void) const;
int getRowOfItem(void) const;
void clearChildren(void);
int getChildrenCount() const;
int getRowOfItem() const;
void clearChildren();
private:
itemType m_type;
@@ -92,7 +93,7 @@ class SearchResultFile: public SearchResultTreeItem
{
public:
SearchResultFile(const QString &fileName, const SearchResultTreeItem *parent);
QString getFileName(void) const;
QString getFileName() const;
void appendResultLine(int index, int lineNumber, const QString &rowText, int searchTermStart,
int searchTermLength);
@@ -100,7 +101,7 @@ private:
QString m_fileName;
};
} //Internal
} //Find
} // namespace Internal
} // namespace Find
#endif
#endif // SEARCHRESULTTREEITEMS_H

View File

@@ -30,17 +30,18 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "searchresulttreemodel.h"
#include "searchresulttreeitems.h"
#include "searchresulttreeitemroles.h"
#include <QtGui/QFont>
#include <QtGui/QColor>
using namespace Find::Internal;
SearchResultTreeModel::SearchResultTreeModel(QObject *parent)
: QAbstractItemModel(parent)
, m_lastAppendedResultFile(NULL)
: QAbstractItemModel(parent), m_lastAppendedResultFile(0)
{
m_rootItem = new SearchResultTreeItem();
}

View File

@@ -30,19 +30,20 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef SEARCHRESULTTREEMODEL_H
#define SEARCHRESULTTREEMODEL_H
#include <QtCore/QAbstractItemModel>
namespace Find{
namespace Find {
namespace Internal {
class SearchResultTreeItem;
class SearchResultTextRow;
class SearchResultFile;
class SearchResultTreeModel: public QAbstractItemModel
class SearchResultTreeModel : public QAbstractItemModel
{
Q_OBJECT
@@ -81,7 +82,7 @@ private:
SearchResultFile *m_lastAppendedResultFile;
};
} //Internal
} //Find
} // namespace Internal
} // namespace Find
#endif
#endif // SEARCHRESULTTREEMODEL_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "searchresulttreeview.h"
#include "searchresulttreeitemroles.h"
#include "searchresulttreemodel.h"
@@ -40,8 +41,7 @@
using namespace Find::Internal;
SearchResultTreeView::SearchResultTreeView(QWidget *parent)
: QTreeView(parent)
, m_autoExpandResults(false)
: QTreeView(parent), m_autoExpandResults(false)
{
m_model = new SearchResultTreeModel(this);
setModel(m_model);
@@ -71,7 +71,7 @@ void SearchResultTreeView::appendResultLine(int index, const QString &fileName,
int rowsAfter = m_model->rowCount();
if (m_autoExpandResults && (rowsAfter > rowsBefore))
setExpanded(model()->index(model()->rowCount()-1, 0), true);
setExpanded(model()->index(model()->rowCount() - 1, 0), true);
}
void SearchResultTreeView::emitJumpToSearchResult(const QModelIndex &index)

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef SEARCHRESULTTREEVIEW_H
#define SEARCHRESULTTREEVIEW_H
@@ -41,7 +42,7 @@ namespace Internal {
class SearchResultTreeModel;
class SearchResultTreeView: public QTreeView
class SearchResultTreeView : public QTreeView
{
Q_OBJECT

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "searchresultwindow.h"
#include "searchresulttreemodel.h"
@@ -45,7 +46,7 @@ using namespace Find::Internal;
static const QString SETTINGSKEYSECTIONNAME("SearchResults");
static const QString SETTINGSKEYEXPANDRESULTS("ExpandResults");
SearchResultWindow::SearchResultWindow(Core::ICore *core):
SearchResultWindow::SearchResultWindow(Core::ICore *core) :
m_core(core),
m_widget(new QStackedWidget())
{

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef SEARCHRESULTWINDOW_H
#define SEARCHRESULTWINDOW_H
@@ -91,8 +92,8 @@ private slots:
int searchTermStart, int searchTermLength);
private:
void readSettings(void);
void writeSettings(void);
void readSettings();
void writeSettings();
Internal::SearchResultTreeView *m_searchResultTreeView;
QListWidget *m_noMatchesFoundDisplay;

View File

@@ -30,28 +30,31 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef TEXTFINDCONSTANTS_H
#define TEXTFINDCONSTANTS_H
namespace Find {
namespace Constants {
const char * const M_FIND = "Find.FindMenu";
const char * const G_FIND_FILTERS = "Find.FindMenu.Filters";
const char * const G_FIND_FLAGS = "Find.FindMenu.Flags";
const char * const G_FIND_ACTIONS = "Find.FindMenu.Actions";
namespace Find {
namespace Constants {
const char * const FIND = "Find.FindReplace";
const char * const FIND_IN_DOCUMENT = "Find.FindInCurrentDocument";
const char * const FIND_NEXT = "Find.FindNext";
const char * const FIND_PREVIOUS = "Find.FindPrevious";
const char * const FIND_ALL = "Find.FindAll";
const char * const REPLACE_NEXT = "Find.ReplaceNext";
const char * const REPLACE_PREVIOUS = "Find.ReplacePrevious";
const char * const REPLACE_ALL = "Find.ReplaceAll";
const char * const CASE_SENSITIVE = "Find.CaseSensitive";
const char * const WHOLE_WORDS = "Find.WholeWords";
const char * const TASK_SEARCH = "Find.Task.Search";
}
} //Find
const char * const M_FIND = "Find.FindMenu";
const char * const G_FIND_FILTERS = "Find.FindMenu.Filters";
const char * const G_FIND_FLAGS = "Find.FindMenu.Flags";
const char * const G_FIND_ACTIONS = "Find.FindMenu.Actions";
#endif //TEXTFINDCONSTANTS_H
const char * const FIND = "Find.FindReplace";
const char * const FIND_IN_DOCUMENT = "Find.FindInCurrentDocument";
const char * const FIND_NEXT = "Find.FindNext";
const char * const FIND_PREVIOUS = "Find.FindPrevious";
const char * const FIND_ALL = "Find.FindAll";
const char * const REPLACE_NEXT = "Find.ReplaceNext";
const char * const REPLACE_PREVIOUS = "Find.ReplacePrevious";
const char * const REPLACE_ALL = "Find.ReplaceAll";
const char * const CASE_SENSITIVE = "Find.CaseSensitive";
const char * const WHOLE_WORDS = "Find.WholeWords";
const char * const TASK_SEARCH = "Find.Task.Search";
} // namespace Constants
} // namespace Find
#endif // TEXTFINDCONSTANTS_H