Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 33c91338 authored by Robert Knight's avatar Robert Knight

EBN fixes. Mostly copyright and implementations including their own headers first.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=662726
parent c7debcd4
......@@ -17,6 +17,9 @@
02110-1301 USA.
*/
// Own
#include "Application.h"
#include "kdebug.h"
// KDE
......@@ -30,7 +33,6 @@
#include "SessionManager.h"
#include "KeyTrans.h"
#include "KeyboardTranslator.h"
#include "Application.h"
#include "MainWindow.h"
#include "Session.h"
#include "TerminalDisplay.h"
......
......@@ -18,6 +18,9 @@
02110-1301 USA.
*/
// Own
#include "BlockArray.h"
// System
#include <assert.h>
#include <sys/mman.h>
......@@ -28,9 +31,6 @@
// KDE
#include <kdebug.h>
// Konsole
#include "BlockArray.h"
using namespace Konsole;
static int blocksize = 0;
......
......@@ -21,6 +21,9 @@
// Born as kdelibs/kio/kfile/kfilebookmarkhandler.characterpp
// Own
#include "BookmarkHandler.h"
// Qt
#include <QFile>
......@@ -35,7 +38,6 @@
#include <KStandardDirs>
// Konsole
#include "BookmarkHandler.h"
#include "ViewProperties.h"
using namespace Konsole;
......
......@@ -22,6 +22,10 @@
#ifndef KONSOLEBOOKMARKHANDLER_H
#define KONSOLEBOOKMARKHANDLER_H
// Qt
#include <QMenu>
// KDE
#include <KBookmarkManager>
class KMenu;
......
......@@ -19,6 +19,9 @@
02110-1301 USA.
*/
// Own
#include "ColorScheme.h"
// Qt
#include <QFile>
#include <QFileInfo>
......@@ -29,7 +32,6 @@
#include <KStandardDirs>
// Konsole
#include "ColorScheme.h"
#include "TECommon.h"
using namespace Konsole;
......@@ -212,7 +214,7 @@ ColorScheme* KDE3ColorSchemeReader::read()
while ( !_device->atEnd() )
{
QString line(_device->readLine());
line.replace(comment,QString::null);
line.replace(comment,QString());
line = line.simplified();
if ( line.isEmpty() )
......
......@@ -17,6 +17,9 @@
02110-1301 USA.
*/
// Own
#include "ColorSchemeEditor.h"
// Qt
#include <QBrush>
#include <QFontMetrics>
......@@ -29,7 +32,6 @@
#include <KColorDialog>
// Konsole
#include "ColorSchemeEditor.h"
#include "ui_ColorSchemeEditor.h"
#include "TECommon.h"
......
......@@ -17,6 +17,9 @@
02110-1301 USA.
*/
// Own
#include "EditProfileDialog.h"
// Qt
#include <QHideEvent>
#include <QLinearGradient>
......@@ -35,7 +38,6 @@
#include "ColorScheme.h"
#include "ColorSchemeEditor.h"
#include "ui_EditProfileDialog.h"
#include "EditProfileDialog.h"
#include "EditTabTitleFormatDialog.h"
#include "KeyBindingEditor.h"
#include "KeyboardTranslator.h"
......@@ -104,7 +106,7 @@ void EditProfileDialog::setProfile(const QString& key)
// setup each page of the dialog
setupGeneralPage(info);
setupAppearencePage(info);
setupAppearancePage(info);
setupKeyboardPage(info);
setupScrollingPage(info);
setupAdvancedPage(info);
......@@ -123,7 +125,7 @@ void EditProfileDialog::setupGeneralPage(const Profile* info)
_ui->commandEdit->setText( command.fullCommand() );
KUrlCompletion* exeCompletion = new KUrlCompletion(KUrlCompletion::ExeCompletion);
exeCompletion->setDir(QString::null);
exeCompletion->setDir(QString());
_ui->commandEdit->setCompletionObject( exeCompletion );
_ui->initialDirEdit->setText( info->defaultWorkingDirectory() );
_ui->initialDirEdit->setCompletionObject( new KUrlCompletion(KUrlCompletion::DirCompletion) );
......@@ -256,7 +258,7 @@ void EditProfileDialog::selectInitialDir()
if ( !url.isEmpty() )
_ui->initialDirEdit->setText(url.path());
}
void EditProfileDialog::setupAppearencePage(const Profile* info)
void EditProfileDialog::setupAppearancePage(const Profile* info)
{
// setup color list
updateColorSchemeList();
......
......@@ -95,7 +95,7 @@ private slots:
void alwaysShowTabBar();
void showTabBarAsNeeded();
// appearence page
// appearance page
void setFontSize(int pointSize);
void showFontDialog();
void newColorScheme();
......@@ -139,7 +139,7 @@ private slots:
private:
// initialize various pages of the dialog
void setupGeneralPage(const Profile* info);
void setupAppearencePage(const Profile* info);
void setupAppearancePage(const Profile* info);
void setupKeyboardPage(const Profile* info);
void setupScrollingPage(const Profile* info);
void setupAdvancedPage(const Profile* info);
......
......@@ -17,11 +17,13 @@
02110-1301 USA.
*/
// Own
#include "EditTabTitleFormatDialog.h"
// KDE
#include <KLocale>
// Konsole
#include "EditTabTitleFormatDialog.h"
#include "ui_EditTabTitleFormatDialog.h"
using namespace Konsole;
......
......@@ -65,6 +65,9 @@
a fixed rate.
*/
// Own
#include "Emulation.h"
// System
#include <assert.h>
#include <stdio.h>
......@@ -74,7 +77,6 @@
// Qt
#include <QApplication>
#include <QClipboard>
#include <QClipboard>
#include <QHashIterator>
#include <QKeyEvent>
#include <QRegExp>
......@@ -89,7 +91,6 @@
#include "Screen.h"
#include "TerminalCharacterDecoder.h"
#include "ScreenWindow.h"
#include "Emulation.h"
using namespace Konsole;
......
......@@ -94,7 +94,7 @@ public:
*
* @param stream The text stream into which the output history will be written.
* @param decoder A decoder which converts lines of terminal characters with
* appearence attributes into output text. PlainTextDecoder is the most commonly
* appearance attributes into output text. PlainTextDecoder is the most commonly
* used decoder.
*/
virtual void writeToStream(QTextStream* stream,TerminalCharacterDecoder* decoder,int startLine,int endLine);
......
......@@ -17,6 +17,9 @@
02110-1301 USA.
*/
// Own
#include "Filter.h"
// System
#include <iostream>
......@@ -34,7 +37,6 @@
#include <KRun>
// Konsole
#include "Filter.h"
#include "TerminalCharacterDecoder.h"
using namespace Konsole;
......@@ -431,7 +433,7 @@ QString UrlFilter::HotSpot::tooltip() const
else if ( kind == Email )
return i18n("Click to send an email to '%1'.",url);
else
return QString::null;
return QString();
}
UrlFilter::HotSpot::UrlType UrlFilter::HotSpot::urlType() const
{
......
......@@ -21,6 +21,7 @@
#define FILTER_H
// Qt
#include <QAction>
#include <QList>
#include <QObject>
#include <QStringList>
......
......@@ -18,8 +18,11 @@
02110-1301 USA.
*/
#include <iostream>
// Own
#include "History.h"
// System
#include <iostream>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
......@@ -27,6 +30,8 @@
#include <sys/mman.h>
#include <unistd.h>
#include <errno.h>
// KDE
#include <kdebug.h>
// Reasonable line size
......
......@@ -17,6 +17,9 @@
02110-1301 USA.
*/
// Own
#include "HistorySizeDialog.h"
// Qt
#include <QButtonGroup>
#include <QHBoxLayout>
......@@ -30,7 +33,6 @@
#include <KLocalizedString>
// Konsole
#include "HistorySizeDialog.h"
#include "SessionManager.h"
using namespace Konsole;
......
......@@ -17,6 +17,9 @@
02110-1301 USA.
*/
// Own
#include "IncrementalSearchBar.h"
// Qt
#include <QCheckBox>
#include <QHBoxLayout>
......@@ -31,9 +34,6 @@
#include <KLocale>
#include <KIcon>
// Konsole
#include "IncrementalSearchBar.h"
using namespace Konsole;
IncrementalSearchBar::IncrementalSearchBar(Features features , QWidget* parent)
......
......@@ -17,11 +17,13 @@
02110-1301 USA.
*/
// Own
#include "KeyBindingEditor.h"
// Qt
#include <QHeaderView>
// Konsole
#include "KeyBindingEditor.h"
#include "ui_KeyBindingEditor.h"
#include "KeyboardTranslator.h"
......
......@@ -25,6 +25,9 @@
FIXME: some bug crept in, disallowing '\0' to be emitted.
*/
// Own
#include "KeyTrans.h"
// System
#include <stdio.h>
#include <stddef.h>
......@@ -39,9 +42,6 @@
#include <kstandarddirs.h>
#include <klocale.h>
// Konsole
#include "KeyTrans.h"
/* KeyEntry
instances represent the individual assignments
......
......@@ -19,6 +19,9 @@
02110-1301 USA.
*/
// Own
#include "KeyboardTranslator.h"
// System
#include <stdio.h>
......@@ -32,9 +35,6 @@
// KDE
#include <KStandardDirs>
// Konsole
#include "KeyboardTranslator.h"
using namespace Konsole;
KeyboardTranslatorManager* KeyboardTranslatorManager::_instance = 0;
......@@ -266,7 +266,7 @@ QKeySequence KeyboardTranslatorReader::decodeSequence(const QString& text , Keyb
"(\\+|\\-)newline|"
"(\\+|\\-)meta)",Qt::CaseInsensitive);
QString newText(text);
newText.replace(modifierRemover,QString::null);
newText.replace(modifierRemover,QString());
if ( modifiers & Qt::ShiftModifier )
newText.prepend("shift+");
......
......@@ -17,6 +17,9 @@
02110-1301 USA.
*/
// Own
#include "MainWindow.h"
// Qt
#include <QApplication>
#include <QVBoxLayout>
......@@ -41,7 +44,6 @@
#include "BookmarkHandler.h"
#include "IncrementalSearchBar.h"
#include "MainWindow.h"
#include "RemoteConnectionDialog.h"
#include "SessionController.h"
#include "ProfileList.h"
......
......@@ -17,6 +17,9 @@
02110-1301 USA.
*/
// Own
#include "ManageProfilesDialog.h"
// Qt
#include <QCheckBox>
#include <QHeaderView>
......@@ -31,7 +34,6 @@
#include "EditProfileDialog.h"
#include "SessionManager.h"
#include "ui_ManageProfilesDialog.h"
#include "ManageProfilesDialog.h"
using namespace Konsole;
......
......@@ -18,13 +18,13 @@
02110-1301 USA.
*/
// Own
#include "OverlayFrame.h"
// Qt
#include <QApplication>
#include <QPainter>
// Konsole
#include "OverlayFrame.h"
using namespace Konsole;
void OverlayFrame::setVisible( bool visible )
......
......@@ -17,6 +17,9 @@
02110-1301 USA.
*/
// Own
#include "Part.h"
// Qt
#include <QStringList>
......@@ -29,7 +32,6 @@
#include "Emulation.h"
#include "KeyTrans.h"
#include "KeyboardTranslator.h"
#include "Part.h"
#include "Session.h"
#include "SessionController.h"
#include "SessionManager.h"
......@@ -93,7 +95,7 @@ bool Part::openFile()
void Part::startProgram( const QString& program,
const QStringList& arguments )
{
Session* session = createSession(QString::null);
Session* session = createSession(QString());
session->setProgram(program);
session->setArguments(arguments);
......@@ -102,7 +104,7 @@ void Part::startProgram( const QString& program,
}
void Part::showShellInDir( const QString& dir )
{
Session* session = createSession(QString::null);
Session* session = createSession(QString());
session->setInitialWorkingDirectory(dir);
......
......@@ -18,6 +18,9 @@
* Boston, MA 02110-1301, USA.
**/
// Own
#include "PrintSettings.h"
// Qt
#include <QCheckBox>
#include <QLayout>
......@@ -26,9 +29,6 @@
// KDE
#include <klocale.h>
// Konsole
#include "PrintSettings.h"
using namespace Konsole;
PrintSettings::PrintSettings(QWidget *parent)
......
......@@ -17,6 +17,9 @@
02110-1301 USA.
*/
// Own
#include "ProcessInfo.h"
// Qt
#include <QDebug>
#include <QFile>
......@@ -25,9 +28,6 @@
#include <QTextStream>
#include <QStringList>
// Konsole
#include "ProcessInfo.h"
using namespace Konsole;
ProcessInfo::ProcessInfo(int pid , bool enableEnvironmentRead)
......
......@@ -20,7 +20,9 @@
#ifndef PROCESSINFO_H
#define PROCESSINFO_H
// Qt
#include <QMap>
#include <QString>
#include <QVector>
namespace Konsole
......@@ -95,7 +97,7 @@ public:
* static ProcessInfo::newInstance() method which will return
* a suitable ProcessInfo instance for the current platform.
*/
ProcessInfo(int pid , bool readEnvironment = false);
explicit ProcessInfo(int pid , bool readEnvironment = false);
virtual ~ProcessInfo() {};
/**
......@@ -266,7 +268,7 @@ private:
class NullProcessInfo : public ProcessInfo
{
public:
NullProcessInfo(int pid,bool readEnvironment = false);
explicit NullProcessInfo(int pid,bool readEnvironment = false);
protected:
virtual bool readProcessInfo(int pid,bool readEnvironment);
};
......@@ -278,7 +280,7 @@ protected:
class UnixProcessInfo : public ProcessInfo
{
public:
UnixProcessInfo(int pid,bool readEnvironment = false);
explicit UnixProcessInfo(int pid,bool readEnvironment = false);
protected:
// reads the /proc/<pid>/stat file to get status information
......
/*
Copyright (C) 2006-2007 by Robert Knight <robertknight@gmail.com>
This program 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.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
*/
// Own
#include "ProfileList.h"
// Qt
#include <QAction>
#include <QActionGroup>
......@@ -7,7 +29,6 @@
#include <KIcon>
// Konsole
#include "ProfileList.h"
#include "SessionManager.h"
using namespace Konsole;
......
/*
Copyright (C) 2006-2007 by Robert Knight <robertknight@gmail.com>
This program 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.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
*/
#ifndef SESSIONLIST_H
#define SESSIONLIST_H
......
/*
Copyright (C) 2006-2007 by Robert Knight <robertknight@gmail.com>
This program 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.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
*/
// Own
#include "ProfileListWidget.h"
// Qt
#include <QtDebug>
......@@ -6,9 +27,6 @@
#include <QDropEvent>
#include <QMimeData>
// Konsole
#include "ProfileListWidget.h"
static const char* konsoleSessionMimeFormat = "konsole/session";
ProfileListWidget::ProfileListWidget(QWidget* parent)
......
/*
Copyright (C) 2006-2007 by Robert Knight <robertknight@gmail.com>
This program 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.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
*/
#ifndef SESSIONLISTWIDGET_H
#define SESSIONLISTWIDGET_H
......
......@@ -71,6 +71,9 @@
my prevent this.
*/
// Own
#include "Pty.h"
// System
#include <sys/types.h>
#include <sys/stat.h>
......@@ -87,9 +90,6 @@
#include <KDebug>
#include <KPty>
// Konsole
#include "Pty.h"
using namespace Konsole;
void Pty::donePty()
......
......@@ -17,6 +17,9 @@
02110-1301 USA.
*/
// Own
#include "RemoteConnectionDialog.h"
// Qt
#include <QtDebug>
......@@ -27,7 +30,6 @@
#include "SessionManager.h"
#include "ui_RemoteConnectionDialog.h"
#include "RemoteConnectionDialog.h"
using namespace Konsole;
......
......@@ -18,6 +18,8 @@
02110-1301 USA.
*/
// Own
#include "Screen.h"
// Standard
#include <stdio.h>
......@@ -36,7 +38,6 @@
// Konsole
#include "konsole_wcwidth.h"
#include "Screen.h"
#include "TerminalCharacterDecoder.h"