Commit bee9aa8f authored by Kurt Hindenburg's avatar Kurt Hindenburg

minor style fixes - remove empty lines start/end code blocks

parent f148185e
......@@ -280,7 +280,6 @@ void Application::createTabFromArgs(KCmdLineArgs* args, MainWindow* window,
// This is another side effect of the commit fixing BKO 176902.
window->show();
window->hide();
}
MainWindow* Application::processWindowArgs(KCmdLineArgs* args)
......@@ -318,9 +317,7 @@ MainWindow* Application::processWindowArgs(KCmdLineArgs* args)
// never show
window->setNavigationVisibility(2);
}
}
return window;
}
......
......@@ -126,7 +126,6 @@ void ColorSchemeEditor::editColorItem(QTableWidgetItem* item)
_colors->setColorTableEntry(item->row(), entry);
emit colorsChanged(_colors);
}
}
void ColorSchemeEditor::selectWallpaper()
......
......@@ -283,7 +283,6 @@ QStringList ColorSchemeManager::listKDE3ColorSchemes()
return KGlobal::dirs()->findAllResources("data",
"konsole/*.schema",
KStandardDirs::NoDuplicates);
}
const ColorScheme ColorSchemeManager::_defaultColorScheme;
......
......@@ -769,7 +769,6 @@ void EditProfileDialog::updateTransparencyWarning()
" You need to restart Konsole to see transparent background."));
_ui->transparencyWarningWidget->setHidden(false);
}
}
}
......@@ -1061,7 +1060,6 @@ void EditProfileDialog::setupAdvancedPage(const Profile::Ptr profile)
connect(codecAction, SIGNAL(triggered(QTextCodec*)), this, SLOT(setDefaultCodec(QTextCodec*)));
_ui->characterEncodingLabel->setText(profile->defaultEncoding());
}
void EditProfileDialog::setDefaultCodec(QTextCodec* codec)
{
......@@ -1140,7 +1138,6 @@ void EditProfileDialog::fontSelected(const QFont& aFont)
preview(Profile::Font, aFont);
updateTempProfileProperty(Profile::Font, aFont);
}
void EditProfileDialog::showFontDialog()
{
......@@ -1186,7 +1183,6 @@ void EditProfileDialog::setFontSliderRange(const QFont& aFont)
// Maximum is the greater of 2 times the current size and 14
slider->setRange(qMin(4 * 10, qRound(aFont.pointSizeF() * 10)),
qMax(14 * 10, 2 * qRound(aFont.pointSize() * 10)));
}
void EditProfileDialog::setFontSliderValue(const QFont& aFont)
......@@ -1197,7 +1193,6 @@ void EditProfileDialog::setFontSliderValue(const QFont& aFont)
ColorSchemeViewDelegate::ColorSchemeViewDelegate(QObject* aParent)
: QAbstractItemDelegate(aParent)
{
}
void ColorSchemeViewDelegate::setEntryTimeLine(QTimeLine* timeLine)
......@@ -1315,7 +1310,6 @@ void ColorSchemeViewDelegate::paint(QPainter* painter, const QStyleOptionViewIte
painter->drawText(option.rect , Qt::AlignCenter ,
index.data(Qt::DisplayRole).value<QString>());
}
QSize ColorSchemeViewDelegate::sizeHint(const QStyleOptionViewItem& option,
......
......@@ -361,7 +361,6 @@ void Emulation::setImageSize(int lines, int columns)
// SIGNAL(imageSizeChanged()); See #203185
QTimer::singleShot(200, this, SIGNAL(imageSizeInitialized()));
}
}
QSize Emulation::imageSize() const
......
......@@ -78,7 +78,6 @@ ushort ExtendedCharTable::createExtendedChar(const ushort* unicodePoints , ushor
foreach(const Session * s, sm->sessions()) {
foreach(const TerminalDisplay * td, s->views()) {
usedExtendedChars += td->screenWindow()->screen()->usedExtendedChars();
}
}
......
......@@ -228,7 +228,6 @@ int HistoryScrollFile::startOfLine(int lineno)
{
if (lineno <= 0) return 0;
if (lineno <= getLines()) {
if (!index.isMapped())
index.map();
......
......@@ -43,7 +43,6 @@ HistorySizeDialog::HistorySizeDialog(QWidget* parent)
_ui->tempWarningWidget->setMessageType(KMessageWidget::Information);
_ui->tempWarningWidget->setText(i18nc("@info:status",
"Any adjustments are only temporary to this session."));
}
HistorySizeDialog::~HistorySizeDialog()
......
......@@ -86,7 +86,6 @@ void HistorySizeWidget::setMode(Enum::HistoryModeEnum aMode)
_ui->unlimitedHistoryButton->setChecked(true);
}
_ui->unlimitedWarningWidget->setVisible(Enum::UnlimitedHistory == aMode);
}
Enum::HistoryModeEnum HistorySizeWidget::mode() const
......
......@@ -485,7 +485,6 @@ QByteArray KeyboardTranslator::Entry::unescape(const QByteArray& input) const
QByteArray result(input);
for (int i = 0 ; i < result.count() - 1 ; i++) {
QByteRef ch = result[i];
if (ch == '\\') {
char replacement[2] = {0, 0};
......
......@@ -90,7 +90,6 @@ void KeyboardTranslatorManager::findTranslators()
// the name with a null pointer to indicate that the translator
// has not yet been loaded from disk
foreach(const QString& translatorPath, list) {
QString name = QFileInfo(translatorPath).baseName();
if (!_translators.contains(name))
......
......@@ -722,7 +722,6 @@ void MainWindow::showEvent(QShowEvent* aEvent)
{
// Make sure the 'initial' visibility is applied only once.
if (!_menuBarInitialVisibilityApplied) {
// the initial visibility of menubar should be applied at this last
// moment. Otherwise, the initial visibility will be determined by
// what KMainWindow has automatically stored in konsolerc, but not by
......
......@@ -132,7 +132,6 @@ void ManageProfilesDialog::itemDataChanged(QStandardItem* item)
ProfileManager::instance()->changeProfile(profile, properties);
}
}
}
int ManageProfilesDialog::rowForProfile(const Profile::Ptr profile) const
......@@ -272,7 +271,6 @@ void ManageProfilesDialog::tableSelectionChanged(const QItemSelection&)
// do not allow the default session type to be removed
_ui->deleteProfileButton->setEnabled(isDeletable && isNotDefault);
_ui->setAsDefaultButton->setEnabled(isNotDefault && (selectedRows < 2));
}
void ManageProfilesDialog::deleteSelected()
{
......
......@@ -983,7 +983,6 @@ SSHProcessInfo::SSHProcessInfo(const ProcessInfo& process)
// host has already been found, this must be the command argument
_command = args[i];
}
}
} else {
kWarning() << "Could not read arguments";
......
......@@ -228,7 +228,6 @@ void ProfileManager::loadAllProfiles()
void ProfileManager::sortProfiles(QList<Profile::Ptr>& list)
{
QList<Profile::Ptr> lackingIndices;
QList<Profile::Ptr> havingIndices;
......@@ -575,7 +574,6 @@ void ProfileManager::saveFavorites()
QStringList paths;
foreach(const Profile::Ptr& profile, _favorites) {
Q_ASSERT(_profiles.contains(profile) && profile);
QFileInfo fileInfo(profile->path());
......
......@@ -62,7 +62,6 @@ void KDE4ProfileReader::readProperties(const KConfig& config, Profile::Ptr profi
if (group.hasKey(name))
profile->setProperty(properties->property,
group.readEntry(name, QVariant(properties->type)));
}
properties++;
......
......@@ -77,7 +77,6 @@ QString KDE4ProfileWriter::getPath(const Profile::Ptr profile)
} else {
newPath = candidateLocalPath;
}
}
return newPath;
......
......@@ -141,7 +141,6 @@ void Screen::setMargins(int top, int bot)
_bottomMargin = bot;
_cuX = 0;
_cuY = getMode(MODE_Origin) ? top : 0;
}
int Screen::topMargin() const
......@@ -435,7 +434,6 @@ void Screen::copyFromScreen(Character* dest , int startLine , int count) const
if (_selBegin != -1 && isSelected(column, line + _history->getLines()))
reverseRendition(dest[destIndex]);
}
}
}
......@@ -1313,7 +1311,6 @@ void Screen::addHistLine()
_selBegin = _selBottomRight;
}
}
}
int Screen::getHistLines() const
......
......@@ -609,7 +609,6 @@ void Session::silenceTimerDone()
} else {
emit stateChanged(NOTIFYNORMAL);
}
}
void Session::activityTimerDone()
......
......@@ -372,7 +372,6 @@ void SessionController::updateWebSearchMenu()
if (KUriFilter::self()->filterSearchUri(filterData, KUriFilter::NormalTextFilter)) {
const QStringList searchProviders = filterData.preferredSearchProviders();
if (!searchProviders.isEmpty()) {
_webSearchMenu->setText(i18n("Search for '%1' with", KStringHandler::rsqueeze(searchText, 16)));
KAction* action = 0;
......@@ -395,9 +394,7 @@ void SessionController::updateWebSearchMenu()
_webSearchMenu->setVisible(true);
}
}
}
void SessionController::handleWebShortcutAction()
......@@ -678,7 +675,6 @@ void SessionController::setupExtraActions()
_searchToggleAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_F));
_findPreviousAction->setShortcut(QKeySequence(Qt::Key_F3));
_findPreviousAction->setShortcut(QKeySequence(Qt::SHIFT + Qt::Key_F3));
}
void SessionController::switchProfile(Profile::Ptr profile)
......@@ -976,7 +972,6 @@ void SessionController::copyInputToNone()
delete _copyToGroup;
_copyToGroup = 0;
snapshot();
}
void SessionController::searchClosed()
......@@ -1442,7 +1437,6 @@ void SaveHistoryTask::execute()
// to save that session's history.
// then start a KIO job to transfer the data from the history to the chosen URL
foreach(const SessionPtr& session, sessions()) {
dialog->setCaption(i18n("Save Output From %1", session->title(Session::NameRole)));
int result = dialog->exec();
......@@ -1666,7 +1660,6 @@ void SearchHistoryTask::executeOnScreenWindow(SessionPtr session , ScreenWindowP
//clear the current block of text and move to the next one
string.clear();
line = endLine;
} while (startLine != endLine);
// if no match was found, clear selection to indicate this
......@@ -1695,7 +1688,6 @@ SearchHistoryTask::SearchHistoryTask(QObject* parent)
: SessionTask(parent)
, _direction(ForwardsSearch)
{
}
void SearchHistoryTask::setSearchDirection(SearchDirection direction)
{
......
......@@ -188,7 +188,6 @@ void SessionManager::applyProfile(Session* session, const Profile::Ptr profile ,
if ( apply.shouldApply(Profile::TerminalColumns) ||
apply.shouldApply(Profile::TerminalRows) ) {
const int columns = profile->property<int>(Profile::TerminalColumns);
const int rows = profile->property<int>(Profile::TerminalRows);
session->setPreferredSize( QSize(columns, rows) );
......
......@@ -107,7 +107,6 @@ static bool expandEnv(QString& text)
bool expanded = false;
while ((pos = text.indexOf(QLatin1Char('$'), pos)) != -1) {
// Skip escaped '$'
//
if (pos > 0 && text.at(pos - 1) == QLatin1Char('\\')) {
......
......@@ -36,7 +36,6 @@ PlainTextDecoder::PlainTextDecoder()
, _includeTrailingWhitespace(true)
, _recordLinePositions(false)
{
}
void PlainTextDecoder::setTrailingWhitespace(bool enable)
{
......@@ -142,7 +141,6 @@ HTMLDecoder::HTMLDecoder() :
, _innerSpanOpen(false)
, _lastRendition(DEFAULT_RENDITION)
{
}
void HTMLDecoder::begin(QTextStream* output)
......@@ -168,7 +166,6 @@ void HTMLDecoder::end()
*_output << text;
_output = 0;
}
//TODO: Support for LineProperty (mainly double width , double height)
......@@ -250,7 +247,6 @@ void HTMLDecoder::decodeLine(const Character* const characters, int count, LineP
} else {
text.append("&nbsp;"); //HTML truncates multiple spaces, so use a space marker instead
}
}
//close any remaining open inner spans
......
......@@ -510,7 +510,6 @@ static void drawLineChar(QPainter& paint, int x, int y, int w, int h, uchar code
paint.drawPoint(cx, cy + 1);
if (toDraw & Int33)
paint.drawPoint(cx + 1, cy + 1);
}
void TerminalDisplay::drawLineCharString(QPainter& painter, int x, int y, const QString& str,
......@@ -1021,7 +1020,6 @@ void TerminalDisplay::updateImage()
_fixedFont = saveFixedFont;
x += len - 1;
}
}
//both the top and bottom halves of double height _lines must always be redrawn
......@@ -1220,7 +1218,6 @@ void TerminalDisplay::paintFilters(QPainter& painter)
QList<Filter::HotSpot*> spots = _filterChain->hotSpots();
foreach(Filter::HotSpot* spot, spots) {
QRegion region;
if (_underlineLinks && spot->type() == Filter::HotSpot::Link) {
QRect r;
......@@ -1788,7 +1785,6 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
}
} else if (ev->button() == Qt::MidButton) {
if (_mouseMarks || (ev->modifiers() & Qt::ShiftModifier)) {
const bool appendEnter = ev->modifiers() & Qt::ControlModifier;
if ( _middleClickPasteMode == Enum::PasteFromX11Selection ) {
......@@ -2109,7 +2105,6 @@ void TerminalDisplay::extendSelection(const QPoint& position)
} else {
_screenWindow->setSelectionStart(ohere.x() - 1 - offset , ohere.y() , false);
}
}
_actSel = 2; // within selection
......@@ -2121,7 +2116,6 @@ void TerminalDisplay::extendSelection(const QPoint& position)
} else {
_screenWindow->setSelectionEnd(here.x() + offset , here.y());
}
}
void TerminalDisplay::mouseReleaseEvent(QMouseEvent* ev)
......@@ -2159,7 +2153,6 @@ void TerminalDisplay::mouseReleaseEvent(QMouseEvent* ev)
if (!_mouseMarks &&
(ev->button() == Qt::RightButton || ev->button() == Qt::MidButton ) &&
!(ev->modifiers() & Qt::ShiftModifier) ) {
emit mouseSignal(3,
charColumn + 1,
charLine + 1 + _scrollBar->value() - _scrollBar->maximum() ,
......@@ -2665,7 +2658,6 @@ void TerminalDisplay::outputSuspended(bool suspended)
_gridLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding,
QSizePolicy::Expanding),
1, 0);
}
_outputSuspendedLabel->setVisible(suspended);
......@@ -2896,7 +2888,6 @@ void TerminalDisplay::dropEvent(QDropEvent* event)
additionalActions.append(pasteAction);
if (urls.count() == 1) {
const KUrl url = KIO::NetAccess::mostLocalUrl(urls[0] , 0);
if (url.isLocalFile()) {
......
......@@ -45,7 +45,6 @@ TerminalDisplayAccessible::TerminalDisplayAccessible(TerminalDisplay* display)
int TerminalDisplayAccessible::characterCount()
{
return display()->_usedLines * display()->_usedColumns;
}
......
......@@ -181,7 +181,6 @@ void ViewContainer::removeView(QWidget* view)
if (_views.count() == 0)
emit empty(this);
}
const QList<QWidget*> ViewContainer::views()
......@@ -311,7 +310,6 @@ void ViewContainerTabBar::setDropIndicator(int index, bool drawDisabled)
_dropIndicator->move(mapTo(parentWidget(), pos));
_dropIndicator->show();
}
void ViewContainerTabBar::dragLeaveEvent(QDragLeaveEvent*)
{
......@@ -492,7 +490,6 @@ TabbedViewContainer::TabbedViewContainer(NavigationPosition position , QObject*
setNavigationPosition(position);
_containerWidget->setLayout(_layout);
}
void TabbedViewContainer::setNewViewMenu(QMenu* menu)
{
......@@ -557,7 +554,6 @@ void TabbedViewContainer::navigationPositionChanged(NavigationPosition position)
{
Q_ASSERT(false); // should never reach here
}
}
void TabbedViewContainer::navigationVisibilityChanged(NavigationVisibility mode)
{
......
......@@ -365,7 +365,6 @@ void ViewManager::detachView(ViewContainer* container, QWidget* widgetView)
container->views().count() == 0) {
removeContainer(container);
}
}
void ViewManager::sessionFinished()
......
......@@ -163,7 +163,6 @@ void ViewSplitter::addContainer(ViewContainer* container ,
splitter->insertWidget(oldContainerIndex, newSplitter);
}
}
void ViewSplitter::containerEmpty(ViewContainer* /*container*/)
......
......@@ -450,7 +450,6 @@ void Vt102Emulation::processToken(int token, int p, int q)
{
switch (token)
{
case TY_CHR( ) : _currentScreen->displayCharacter (p ); break; //UTF16
// 127 DEL : ignored on input
......
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