Commit 1524bd5c authored by Michael Reeves's avatar Michael Reeves

cleanup headers

parent e4ae6da5
......@@ -23,9 +23,6 @@
#include <KAbstractFileItemActionPlugin>
#include <KFileItemListProperties>
#include <QStringList>
class QStringList;
class KDiff3FileItemAction : public KAbstractFileItemActionPlugin
{
......
......@@ -14,8 +14,7 @@
#include "diff.h"
#include <QString>
class MergeResultWindow;
#include <QVector>
class MergeEditLine
{
......
......@@ -11,9 +11,10 @@
#include "Overview.h"
#include "diff.h"
#include "mergeresultwindow.h"
#include "options.h"
#include <algorithm> // for max
#include <QColor>
#include <QMouseEvent>
#include <QPainter>
......
......@@ -11,12 +11,16 @@
#ifndef OVERVIEW_H
#define OVERVIEW_H
#include "diff.h"
#include "options.h"
#include "LineRef.h" // for LineRef
#include "TypeUtils.h" // for QtNumberType
#include <QString> // for QString
#include <QPixmap>
#include <QWidget>
class Diff3LineList;
class Options;
class Overview : public QWidget
{
Q_OBJECT
......
/**
* Copyright (C) 2003-2007 by Joachim Eibl <joachim.eibl at gmx.de>
* Copyright (C) 2018 Michael Reeves reeves.87@gmail.com
*
*
* This file is part of KDiff3.
*
*
* KDiff3 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
*
* KDiff3 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with KDiff3. If not, see <http://www.gnu.org/licenses/>.
*
*
*/
#include "Utils.h"
#include <KLocalizedString>
#include <QString>
#include <QStringList>
#include <QHash>
#include <QRegExp>
#include <KLocalizedString>
/* Split the command line into arguments.
* Normally split at white space separators except when quoting with " or '.
......
......@@ -21,9 +21,10 @@
#ifndef UTILS_H
#define UTILS_H
#include <QChar>
#include <QFontMetrics>
#include <QStringList>
#include <QString>
#include <QStringList>
class Utils{
public:
......
......@@ -11,19 +11,18 @@
#include "diff.h"
#include "Utils.h"
#include "fileaccess.h"
#include "gnudiff_diff.h"
#include "options.h"
#include "progress.h"
#include <cstdlib>
#include <ctype.h>
#include <map>
#include <KLocalizedString>
#include <KMessageBox>
#include <qglobal.h>
#include <QtGlobal>
#include <QSharedPointer>
int LineData::width(int tabSize) const
{
......
......@@ -14,13 +14,14 @@
#include "common.h"
#include "fileaccess.h"
#include "options.h"
#include "gnudiff_diff.h"
#include "LineRef.h"
#include "SourceData.h"
#include "Logging.h"
#include <QList>
class Options;
//enum must be sequential with no gaps to allow loop interiation of values
enum e_SrcSelector
{
......
......@@ -12,6 +12,7 @@
#include "difftextwindow.h"
#include "common.h" // for getAtomic, max3, min3
#include "FileNameLineEdit.h"
#include "kdiff3.h"
#include "merger.h"
......@@ -19,11 +20,15 @@
#include "progress.h"
#include "RLPainter.h"
#include "selection.h"
#include "SourceData.h" // for SourceData
#include "Utils.h" // for Utils
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <KLocalizedString>
#include <QtMath>
#include <QDir>
#include <QDragEnterEvent>
......@@ -42,8 +47,6 @@
#include <QToolTip>
#include <QUrl>
#include <KLocalizedString>
QAtomicInt s_runnableCount = 0;
class DiffTextWindowData
......
......@@ -16,6 +16,8 @@
#include "diff.h"
#include <QLabel>
#include <QSharedPointer> // for QSharedPointer
#include <QString> // for QString
class QMenu;
class QStatusBar;
......
......@@ -36,11 +36,12 @@
#define GDIFF_MAIN
#include "common.h"
#include "gnudiff_diff.h"
//#include <error.h>
#include <algorithm> // for max, min
#include <stdlib.h>
static GNULineRef *xvec, *yvec; /* Vectors being compared. */
static GNULineRef *fdiag; /* Vector, indexed by diagonal, containing
1 + the X coordinate of the point furthest
......
......@@ -19,8 +19,6 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -23,6 +23,7 @@
#include "difftextwindow.h"
#include "mergeresultwindow.h"
#include "RLPainter.h"
#include "Utils.h"
#ifndef Q_OS_WIN
#include <unistd.h>
......
......@@ -13,6 +13,9 @@
#include "Logging.h"
#include <stdio.h>// for fileno, stderr
#include <stdlib.h>// for exit
#ifndef Q_OS_WIN
#include <unistd.h>
#endif
......@@ -23,7 +26,6 @@
#include <KMessageBox>
#include <QApplication>
#include <QByteArray>
#include <QCommandLineOption>
#include <QCommandLineParser>
#include <QFile>
......
......@@ -13,6 +13,8 @@
#include "options.h"
#include "RLPainter.h"
#include "guiutils.h"
#include "Utils.h" // for Utils
#include <QApplication>
#include <QClipboard>
......
......@@ -21,7 +21,7 @@
#include "optiondialog.h"
#include "OptionItems.h"
#include "diff.h"
#include "common.h"
#include "smalldialogs.h"
#include <map>
......@@ -36,7 +36,6 @@
#include <QCheckBox>
#include <QComboBox>
#include <QDialogButtonBox>
#include <QDir>
#include <QFontDatabase>
#include <QFontDialog>
#include <QFrame>
......@@ -45,14 +44,13 @@
#include <QLabel>
#include <QLayout>
#include <QLineEdit>
#include <QLocale>
#include <QPixmap>
#include <QPlainTextEdit>
#include <QPointer>
#include <QPushButton>
#include <QRadioButton>
#include <QTextCodec>
#include <QToolTip>
//#include <QToolTip>
QString s_historyEntryStartRegExpToolTip;
QString s_historyEntryStartSortKeyOrderToolTip;
......
......@@ -21,15 +21,15 @@
#ifndef OPTION_DIALOG_H
#define OPTION_DIALOG_H
#include "options.h"
#include <QSharedPointer> // for QSharedPointer
#include <QStringList>
#include <QGroupBox>
#include <KPageDialog>
#include <KSharedConfig>
#include <list>
#include "options.h"
class QLabel;
class QPlainTextEdit;
......
......@@ -9,7 +9,9 @@
***************************************************************************/
#include "selection.h"
#include "gnudiff_diff.h"
#include <limits.h> // for INT_MAX
#include <utility> // for swap
#include <QtGlobal>
......@@ -64,7 +66,7 @@ bool Selection::within(LineRef l, LineRef p)
{
if(firstLine == invalidRef)
return false;
LineRef l1 = firstLine;
LineRef l2 = lastLine;
int p1 = firstPos;
......
......@@ -10,8 +10,9 @@
#ifndef SELECTION_H
#define SELECTION_H
#include "gnudiff_diff.h"
#include "common.h"
#include "LineRef.h"
#include <algorithm> // for max, min
class Selection
{
......@@ -24,7 +25,7 @@ private:
int firstPos = -1;
int lastPos = -1;
LineRef oldFirstLine = invalidRef;
LineRef oldLastLine = invalidRef;
public:
......@@ -39,7 +40,7 @@ public:
inline bool isValidFirstLine() { return firstLine != invalidRef; }
inline void clearOldSelection() { oldLastLine = invalidRef, oldFirstLine = invalidRef; };
inline LineRef getOldLastLine() { return oldLastLine; };
inline LineRef getOldFirstLine() { return oldFirstLine; };
inline bool selectionContainsData() { return bSelectionContainsData; };
......@@ -65,13 +66,13 @@ public:
bool lineWithin( LineRef l );
int firstPosInLine(LineRef l);
int lastPosInLine(LineRef l);
LineRef beginLine(){
LineRef beginLine(){
if (firstLine<0 && lastLine<0) return invalidRef;
return std::max((LineRef)0,std::min(firstLine,lastLine));
return std::max((LineRef)0,std::min(firstLine,lastLine));
}
LineRef endLine(){
LineRef endLine(){
if (firstLine<0 && lastLine<0) return invalidRef;
return std::max(firstLine,lastLine);
return std::max(firstLine,lastLine);
}
int beginPos() { return firstLine==lastLine ? std::min(firstPos,lastPos) :
firstLine<lastLine ? (firstLine<0?0:firstPos) : (lastLine<0?0:lastPos); }
......
Markdown is supported
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