From 125e2c7bd2877991cb224bc3b79c9650d2f6deb0 Mon Sep 17 00:00:00 2001 From: Jekyll Wu Date: Sun, 6 Nov 2011 06:13:28 +0800 Subject: [PATCH] Declare pointer and reference in a consistent way Most code use the "const QString& text" form, instead of the "const QString &text" form. So change the minority to be consistent with the majority. --- src/BookmarkHandler.cpp | 2 +- src/CopyInputDialog.cpp | 2 +- src/Emulation.cpp | 6 +++--- src/History.cpp | 22 +++++++++++----------- src/History.h | 14 +++++++------- src/MainWindow.cpp | 10 +++++----- src/MainWindow.h | 4 ++-- src/ManageProfilesDialog.cpp | 6 +++--- src/ProcessInfo.cpp | 8 ++++---- src/Screen.cpp | 2 +- src/Screen.h | 10 +++++----- src/Session.cpp | 18 +++++++++--------- src/Session.h | 6 +++--- src/SessionManager.cpp | 4 ++-- src/SessionManager.h | 4 ++-- src/ShellCommand.cpp | 4 ++-- src/TabTitleFormatAction.h | 2 +- src/TerminalDisplay.cpp | 10 +++++----- src/TerminalDisplay.h | 2 +- src/ViewContainer.cpp | 2 +- src/ViewManager.cpp | 12 ++++++------ src/ViewManager.h | 2 +- src/XKB.cpp | 2 +- src/ZModemDialog.h | 2 +- src/konsole_wcwidth.cpp | 2 +- 25 files changed, 79 insertions(+), 79 deletions(-) diff --git a/src/BookmarkHandler.cpp b/src/BookmarkHandler.cpp index bd6e502df..5f1710fd3 100644 --- a/src/BookmarkHandler.cpp +++ b/src/BookmarkHandler.cpp @@ -54,7 +54,7 @@ BookmarkHandler::BookmarkHandler( KActionCollection* collection, if ( _file.isEmpty() ) _file = KStandardDirs::locateLocal( "data", "konsole/bookmarks.xml" ); - KBookmarkManager *manager = KBookmarkManager::managerForFile( _file, "konsole" ); + KBookmarkManager* manager = KBookmarkManager::managerForFile( _file, "konsole" ); manager->setUpdate( true ); diff --git a/src/CopyInputDialog.cpp b/src/CopyInputDialog.cpp index 163f8cbbb..f372d9a30 100644 --- a/src/CopyInputDialog.cpp +++ b/src/CopyInputDialog.cpp @@ -100,7 +100,7 @@ void CopyInputDialog::setSelectionChecked(bool checked) if (selected.count() > 1) { - foreach(const QModelIndex &index,selected) + foreach(const QModelIndex& index, selected) setRowChecked(index.row(),checked); } else diff --git a/src/Emulation.cpp b/src/Emulation.cpp index 1d4a0d4b2..db58e5f63 100644 --- a/src/Emulation.cpp +++ b/src/Emulation.cpp @@ -127,7 +127,7 @@ Emulation::~Emulation() void Emulation::setScreen(int n) { - Screen *old = _currentScreen; + Screen* old = _currentScreen; _currentScreen = _screen[n & 1]; if (_currentScreen != old) { @@ -462,8 +462,8 @@ ushort ExtendedCharTable::createExtendedChar(const ushort* unicodePoints , ushor // All the hashes are full, go to all Screens and try to free any // This is slow but should happen very rarely QSet usedExtendedChars; - const SessionManager *sm = SessionManager::instance(); - foreach(const Session *s, sm->sessions()) + const SessionManager* sm = SessionManager::instance(); + foreach(const Session* s, sm->sessions()) { foreach(const TerminalDisplay* td, s->views()) { diff --git a/src/History.cpp b/src/History.cpp index 5d41091b7..20499780b 100644 --- a/src/History.cpp +++ b/src/History.cpp @@ -188,7 +188,7 @@ bool HistoryScroll::hasScroll() at 0 in cells. */ -HistoryScrollFile::HistoryScrollFile(const QString &logFileName) +HistoryScrollFile::HistoryScrollFile(const QString& logFileName) : HistoryScroll(new HistoryTypeFile(logFileName)) { } @@ -551,7 +551,7 @@ void CompactHistoryBlockList::deallocate(void* ptr) Q_ASSERT( !list.isEmpty()); int i=0; - CompactHistoryBlock *block = list.at(i); + CompactHistoryBlock* block = list.at(i); while ( icontains(ptr) ) { i++; @@ -651,7 +651,7 @@ CompactHistoryLine::~CompactHistoryLine() blockList.deallocate(this); } -void CompactHistoryLine::getCharacter ( int index, Character &r ) +void CompactHistoryLine::getCharacter ( int index, Character& r ) { Q_ASSERT ( index < length ); int formatPos=0; @@ -692,7 +692,7 @@ CompactHistoryScroll::~CompactHistoryScroll() void CompactHistoryScroll::addCellsVector ( const TextLine& cells ) { - CompactHistoryLine *line; + CompactHistoryLine* line; line = new(blockList) CompactHistoryLine ( cells, blockList ); if ( lines.size() > ( int ) _maxLineCount ) @@ -711,7 +711,7 @@ void CompactHistoryScroll::addCells ( const Character a[], int count ) void CompactHistoryScroll::addLine ( bool previousWrapped ) { - CompactHistoryLine *line = lines.last(); + CompactHistoryLine* line = lines.last(); //kDebug() << "last line at address " << line; line->setWrapped(previousWrapped); } @@ -780,7 +780,7 @@ bool HistoryTypeNone::isEnabled() const return false; } -HistoryScroll* HistoryTypeNone::scroll(HistoryScroll *old) const +HistoryScroll* HistoryTypeNone::scroll(HistoryScroll* old) const { delete old; return new HistoryScrollNone(); @@ -889,12 +889,12 @@ bool HistoryTypeFile::isEnabled() const return true; } -HistoryScroll* HistoryTypeFile::scroll(HistoryScroll *old) const +HistoryScroll* HistoryTypeFile::scroll(HistoryScroll* old) const { if (dynamic_cast(old)) return old; // Unchanged. - HistoryScroll *newScroll = new HistoryScrollFile(m_fileName); + HistoryScroll* newScroll = new HistoryScrollFile(m_fileName); Character line[LINE_SIZE]; int lines = (old != 0) ? old->getLines() : 0; @@ -903,7 +903,7 @@ HistoryScroll* HistoryTypeFile::scroll(HistoryScroll *old) const int size = old->getLineLen(i); if (size > LINE_SIZE) { - Character *tmp_line = new Character[size]; + Character* tmp_line = new Character[size]; old->getCells(i, 0, size, tmp_line); newScroll->addCells(tmp_line, size); newScroll->addLine(old->isWrappedLine(i)); @@ -943,11 +943,11 @@ int CompactHistoryType::maximumLineCount() const return m_nbLines; } -HistoryScroll* CompactHistoryType::scroll ( HistoryScroll *old ) const +HistoryScroll* CompactHistoryType::scroll ( HistoryScroll* old ) const { if ( old ) { - CompactHistoryScroll *oldBuffer = dynamic_cast ( old ); + CompactHistoryScroll* oldBuffer = dynamic_cast ( old ); if ( oldBuffer ) { oldBuffer->setMaxNbLines ( m_nbLines ); diff --git a/src/History.h b/src/History.h index 1a7fa8a3f..43be12db4 100644 --- a/src/History.h +++ b/src/History.h @@ -131,7 +131,7 @@ protected: class HistoryScrollFile : public HistoryScroll { public: - HistoryScrollFile(const QString &logFileName); + HistoryScrollFile(const QString& logFileName); virtual ~HistoryScrollFile(); virtual int getLines(); @@ -260,11 +260,11 @@ typedef QVector TextLine; class CharacterFormat { public: - bool equalsFormat(const CharacterFormat &other) const { + bool equalsFormat(const CharacterFormat& other) const { return (other.rendition & ~RE_EXTENDED_CHAR)==(rendition & ~RE_EXTENDED_CHAR) && other.fgColor==fgColor && other.bgColor==bgColor; } - bool equalsFormat(const Character &c) const { + bool equalsFormat(const Character& c) const { return (c.rendition & ~RE_EXTENDED_CHAR)==(rendition & ~RE_EXTENDED_CHAR) && c.foregroundColor==fgColor && c.backgroundColor==bgColor; } @@ -300,7 +300,7 @@ public: virtual unsigned int remaining(){ return blockStart+blockLength-tail;} virtual unsigned length() { return blockLength; } virtual void* allocate(size_t length); - virtual bool contains(void *addr) {return addr>=blockStart && addr<(blockStart+blockLength);} + virtual bool contains(void* addr) {return addr>=blockStart && addr<(blockStart+blockLength);} virtual void deallocate(); virtual bool isInUse(){ return allocCount!=0; } ; @@ -317,7 +317,7 @@ public: CompactHistoryBlockList() {}; ~CompactHistoryBlockList(); - void *allocate( size_t size ); + void* allocate( size_t size ); void deallocate(void *); int length() {return list.size();} private: @@ -331,11 +331,11 @@ public: virtual ~CompactHistoryLine(); // custom new operator to allocate memory from custom pool instead of heap - static void *operator new( size_t size, CompactHistoryBlockList& blockList); + static void* operator new( size_t size, CompactHistoryBlockList& blockList); static void operator delete( void *) { /* do nothing, deallocation from pool is done in destructor*/ } ; virtual void getCharacters(Character* array, int length, int startColumn) ; - virtual void getCharacter(int index, Character &r) ; + virtual void getCharacter(int index, Character& r) ; virtual bool isWrapped() const {return wrapped;}; virtual void setWrapped(bool isWrapped) { wrapped=isWrapped;}; virtual unsigned int getLength() const {return length;}; diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 97d7e2d73..478d25637 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -331,9 +331,9 @@ void MainWindow::sessionListChanged(const QList& actions) if (actions.size() > 2) { // Update the 'New Tab' KActionMenu - KMenu *newTabMenu = _newTabMenuAction->menu(); + KMenu* newTabMenu = _newTabMenuAction->menu(); newTabMenu->clear(); - foreach (QAction *action, actions) { + foreach (QAction* action, actions) { newTabMenu->addAction(action); // NOTE: _defaultProfile seems to not work here, sigh. @@ -349,7 +349,7 @@ void MainWindow::sessionListChanged(const QList& actions) } else { - KMenu *newTabMenu = _newTabMenuAction->menu(); + KMenu* newTabMenu = _newTabMenuAction->menu(); newTabMenu->clear(); Profile::Ptr profile = SessionManager::instance()->defaultProfile(); @@ -447,7 +447,7 @@ void MainWindow::saveProperties(KConfigGroup& group) void MainWindow::readProperties(const KConfigGroup& group) { - SessionManager *manager = SessionManager::instance(); + SessionManager* manager = SessionManager::instance(); QString profilePath = group.readPathEntry("Default Profile", QString()); Profile::Ptr profile = manager->defaultProfile(); if (!profilePath.isEmpty()) @@ -556,7 +556,7 @@ void MainWindow::configureNotifications() KNotifyConfigWidget::configure( this ); } -void MainWindow::showEvent(QShowEvent *event) +void MainWindow::showEvent(QShowEvent* event) { // Make sure the 'initial' visibility is applied only once. if ( ! _menuBarInitialVisibilityApplied ) diff --git a/src/MainWindow.h b/src/MainWindow.h index cff468cb6..10181dc6f 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -145,7 +145,7 @@ class MainWindow : public KXmlGuiWindow protected: // Reimplemented for internal reasons. - virtual void showEvent(QShowEvent *event); + virtual void showEvent(QShowEvent* event); // reimplemented from KMainWindow virtual bool queryClose(); @@ -197,7 +197,7 @@ class MainWindow : public KXmlGuiWindow ViewManager* _viewManager; BookmarkHandler* _bookmarkHandler; KToggleAction* _toggleMenuBarAction; - KActionMenu *_newTabMenuAction; + KActionMenu* _newTabMenuAction; QPointer _pluggedController; diff --git a/src/ManageProfilesDialog.cpp b/src/ManageProfilesDialog.cpp index d3599429c..045a70dd9 100644 --- a/src/ManageProfilesDialog.cpp +++ b/src/ManageProfilesDialog.cpp @@ -244,7 +244,7 @@ void ManageProfilesDialog::populateTable() QList profiles = SessionManager::instance()->loadedProfiles(); SessionManager::instance()->sortProfiles(profiles); - foreach(const Profile::Ptr &profile, profiles) + foreach(const Profile::Ptr& profile, profiles) { addItems(profile); } @@ -312,7 +312,7 @@ void ManageProfilesDialog::tableSelectionChanged(const QItemSelection&) } void ManageProfilesDialog::deleteSelected() { - foreach(const Profile::Ptr &profile, selectedProfiles()) + foreach(const Profile::Ptr& profile, selectedProfiles()) { if (profile != SessionManager::instance()->defaultProfile()) SessionManager::instance()->deleteProfile(profile); @@ -385,7 +385,7 @@ void ManageProfilesDialog::editSelected() EditProfileDialog dialog(this); // the dialog will delete the profile group when it is destroyed ProfileGroup* group = new ProfileGroup; - foreach(const Profile::Ptr &profile,selectedProfiles()) + foreach(const Profile::Ptr& profile,selectedProfiles()) group->addProfile(profile); group->updateValues(); diff --git a/src/ProcessInfo.cpp b/src/ProcessInfo.cpp index e4a858ae1..ab24d5e6a 100644 --- a/src/ProcessInfo.cpp +++ b/src/ProcessInfo.cpp @@ -414,8 +414,8 @@ void UnixProcessInfo::readUserName() if (!ok) return; struct passwd passwdStruct; - struct passwd *getpwResult; - char *getpwBuffer; + struct passwd* getpwResult; + char* getpwBuffer; long getpwBufferSize; int getpwStatus; @@ -584,7 +584,7 @@ private: QStringList argList = data.split( QChar('\0') ); - foreach ( const QString &entry , argList ) + foreach ( const QString& entry , argList ) { if (!entry.isEmpty()) addArgument(entry); @@ -634,7 +634,7 @@ private: QStringList bindingList = data.split( QChar('\0') ); - foreach( const QString &entry , bindingList ) + foreach( const QString& entry , bindingList ) { QString name; QString value; diff --git a/src/Screen.cpp b/src/Screen.cpp index 2584332a6..0a73fdc73 100644 --- a/src/Screen.cpp +++ b/src/Screen.cpp @@ -675,7 +675,7 @@ void Screen::displayCharacter(unsigned short c) { Q_ASSERT(extendedCharLength > 1); Q_ASSERT(extendedCharLength < 65535); - ushort *chars = new ushort[extendedCharLength + 1]; + ushort* chars = new ushort[extendedCharLength + 1]; memcpy (chars, oldChars, sizeof(ushort) * extendedCharLength); chars[extendedCharLength] = c; currentChar.character = ExtendedCharTable::instance.createExtendedChar(chars, extendedCharLength + 1); diff --git a/src/Screen.h b/src/Screen.h index 9dfa90096..4e361b5c2 100644 --- a/src/Screen.h +++ b/src/Screen.h @@ -547,12 +547,12 @@ public: */ static void fillWithDefaultChar(Character* dest, int count); - void setCurrentTerminalDisplay(TerminalDisplay *terminal_display) + void setCurrentTerminalDisplay(TerminalDisplay* display) { - _currentTerminalDisplay = terminal_display; + _currentTerminalDisplay = display; } - TerminalDisplay *currentTerminalDisplay() + TerminalDisplay* currentTerminalDisplay() { return _currentTerminalDisplay; } @@ -562,7 +562,7 @@ public: QSet result; for (int i = 0; i < lines; ++i) { - const ImageLine &il = screenLines[i]; + const ImageLine& il = screenLines[i]; for (int j = 0; j < columns; ++j) { if (il[j].rendition & RE_EXTENDED_CHAR) @@ -613,7 +613,7 @@ private: void scrollDown(int from, int i); //when we handle scroll commands, we need to know which screenwindow will scroll - TerminalDisplay *_currentTerminalDisplay; + TerminalDisplay* _currentTerminalDisplay; void addHistLine(); diff --git a/src/Session.cpp b/src/Session.cpp index 0d16a42d4..6dfd60823 100644 --- a/src/Session.cpp +++ b/src/Session.cpp @@ -83,7 +83,7 @@ QUuid createUuid() qrand(); // Skip first QUuid result; - uint *data = &(result.data1); + uint* data = &(result.data1); int chunks = 16 / sizeof(uint); while (chunks--) { uint randNumber = 0; @@ -239,7 +239,7 @@ void Session::setCodec(QTextCodec* codec) bool Session::setCodec(QByteArray name) { - QTextCodec *codec = QTextCodec::codecForName(name); + QTextCodec* codec = QTextCodec::codecForName(name); if (codec) { setCodec(codec); @@ -279,7 +279,7 @@ QString Session::currentWorkingDirectory() } ProcessInfo* Session::updateWorkingDirectory() { - ProcessInfo *process = getProcessInfo(); + ProcessInfo* process = getProcessInfo(); _currentWorkingDir = process->validCurrentDir(); return process; } @@ -497,7 +497,7 @@ void Session::run() emit started(); } -void Session::setUserTitle( int what, const QString &caption ) +void Session::setUserTitle( int what, const QString& caption ) { //set to true if anything is actually changed (eg. old _nameTitle != new _nameTitle ) bool modified = false; @@ -819,7 +819,7 @@ bool Session::closeInForceWay() } } -void Session::sendText(const QString &text) const +void Session::sendText(const QString& text) const { _emulation->sendText(text); } @@ -905,7 +905,7 @@ int Session::sessionId() const return _sessionId; } -void Session::setKeyBindings(const QString &id) +void Session::setKeyBindings(const QString& id) { _emulation->setKeyBindings(id); } @@ -1089,7 +1089,7 @@ QString Session::iconText() const return _iconText; } -void Session::setHistoryType(const HistoryType &hType) +void Session::setHistoryType(const HistoryType& hType) { _emulation->setHistory(hType); } @@ -1189,7 +1189,7 @@ void Session::cancelZModem() _zmodemBusy = false; } -void Session::startZModem(const QString &zmodem, const QString &dir, const QStringList &list) +void Session::startZModem(const QString& zmodem, const QString& dir, const QStringList& list) { _zmodemBusy = true; _zmodemProc = new KProcess(); @@ -1260,7 +1260,7 @@ void Session::zmodemReadStatus() } } -void Session::zmodemRcvBlock(const char *data, int len) +void Session::zmodemRcvBlock(const char* data, int len) { QByteArray ba( data, len ); diff --git a/src/Session.h b/src/Session.h index 37d57e90b..7e2c87674 100644 --- a/src/Session.h +++ b/src/Session.h @@ -325,7 +325,7 @@ public: */ void refresh(); - void startZModem(const QString &rz, const QString &dir, const QStringList &list); + void startZModem(const QString& rz, const QString& dir, const QStringList& list); void cancelZModem(); bool isZModemBusy() { return _zmodemBusy; } @@ -406,7 +406,7 @@ public slots: * @param what The feature being changed. Value is one of UserTitleChange * @param caption The text part of the terminal command */ - void setUserTitle( int what , const QString &caption ); + void setUserTitle( int what , const QString& caption ); /** * Enables monitoring for activity in the session. @@ -633,7 +633,7 @@ private slots: void zmodemReadStatus(); void zmodemReadAndSendBlock(); - void zmodemRcvBlock(const char *data, int len); + void zmodemRcvBlock(const char* data, int len); void zmodemFinished(); void updateFlowControlState(bool suspended); diff --git a/src/SessionManager.cpp b/src/SessionManager.cpp index 2cfbe0b9a..f9e3c442c 100644 --- a/src/SessionManager.cpp +++ b/src/SessionManager.cpp @@ -231,7 +231,7 @@ void SessionManager::loadAllProfiles() _loadedAllProfiles = true; } -void SessionManager::sortProfiles(QList &list) +void SessionManager::sortProfiles(QList& list) { QList lackingIndices; @@ -429,7 +429,7 @@ void SessionManager::changeProfile(Profile::Ptr profile, ProfileGroup::Ptr group = profile->asGroup(); if (group) { - foreach(const Profile::Ptr &profile, group->profiles()) + foreach(const Profile::Ptr& profile, group->profiles()) changeProfile(profile,propertyMap,persistent); return; } diff --git a/src/SessionManager.h b/src/SessionManager.h index b5f69b0ec..76ed8d32a 100644 --- a/src/SessionManager.h +++ b/src/SessionManager.h @@ -97,7 +97,7 @@ public: * * @param list The profile list to sort */ - void sortProfiles(QList &list); + void sortProfiles(QList& list); /** * Searches for available profiles on-disk and returns a list @@ -255,7 +255,7 @@ public: void saveSessions(KConfig* config); int getRestoreId(Session* session); void restoreSessions(KConfig* config); - Session *idToSession(int id); + Session* idToSession(int id); signals: /** Emitted when a profile is added to the manager. */ diff --git a/src/ShellCommand.cpp b/src/ShellCommand.cpp index ac4bad718..8fec9cf3a 100644 --- a/src/ShellCommand.cpp +++ b/src/ShellCommand.cpp @@ -81,7 +81,7 @@ QStringList ShellCommand::expand(const QStringList& items) { QStringList result; - foreach( const QString &item , items ) + foreach( const QString& item , items ) result << expand(item); return result; @@ -99,7 +99,7 @@ QString ShellCommand::expand(const QString& text) * Expand environment variables in text. Escaped '$' characters are ignored. * Return true if any variables were expanded */ -static bool expandEnv( QString &text ) +static bool expandEnv( QString& text ) { // Find all environment variables beginning with '$' // diff --git a/src/TabTitleFormatAction.h b/src/TabTitleFormatAction.h index 223065dbb..b9ca6e753 100644 --- a/src/TabTitleFormatAction.h +++ b/src/TabTitleFormatAction.h @@ -52,7 +52,7 @@ private: struct Element { QString element; - const char *description; + const char* description; }; static const Element _localElements[]; static const int _localElementCount; diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp index 8eb7833dc..23d2f3930 100644 --- a/src/TerminalDisplay.cpp +++ b/src/TerminalDisplay.cpp @@ -269,7 +269,7 @@ void TerminalDisplay::setLineSpacing(uint i) /* */ /* ------------------------------------------------------------------------- */ -TerminalDisplay::TerminalDisplay(QWidget *parent) +TerminalDisplay::TerminalDisplay(QWidget* parent) :QWidget(parent) ,_screenWindow(0) ,_allowBell(true) @@ -957,7 +957,7 @@ void TerminalDisplay::updateImage() const int linesToUpdate = qMin(this->_lines, qMax(0,lines )); const int columnsToUpdate = qMin(this->_columns,qMax(0,columns)); - char *dirtyMask = new char[columnsToUpdate+2]; + char* dirtyMask = new char[columnsToUpdate+2]; QRegion dirtyRegion; // debugging variable, this records the number of lines that are found to @@ -1189,7 +1189,7 @@ void TerminalDisplay::paintEvent( QPaintEvent* pe ) { QPainter paint(this); - foreach (const QRect &rect, (pe->region() & contentsRect()).rects()) + foreach (const QRect& rect, (pe->region() & contentsRect()).rects()) { drawBackground(paint,rect,palette().background().color(), true /* use opacity setting */); @@ -1324,7 +1324,7 @@ void TerminalDisplay::paintFilters(QPainter& painter) } } } -void TerminalDisplay::drawContents(QPainter &paint, const QRect &rect) +void TerminalDisplay::drawContents(QPainter& paint, const QRect& rect) { const QPoint tL = contentsRect().topLeft(); const int tLx = tL.x(); @@ -2495,7 +2495,7 @@ bool TerminalDisplay::focusNextPrevChild( bool next ) } -QChar TerminalDisplay::charClass(const Character &ch) const +QChar TerminalDisplay::charClass(const Character& ch) const { if (ch.rendition & RE_EXTENDED_CHAR) { diff --git a/src/TerminalDisplay.h b/src/TerminalDisplay.h index 0c0b938c5..97b517e71 100644 --- a/src/TerminalDisplay.h +++ b/src/TerminalDisplay.h @@ -595,7 +595,7 @@ protected: // - A space (returns ' ') // - Part of a word (returns 'a') // - Other characters (returns the input character) - QChar charClass(const Character &ch) const; + QChar charClass(const Character& ch) const; void clearImage(); diff --git a/src/ViewContainer.cpp b/src/ViewContainer.cpp index 074fb7f81..ddb18b1f9 100644 --- a/src/ViewContainer.cpp +++ b/src/ViewContainer.cpp @@ -853,7 +853,7 @@ StackedViewContainer::StackedViewContainer(QObject* parent) : ViewContainer(NavigationPositionTop,parent) { _containerWidget = new QWidget; - QVBoxLayout *layout = new QVBoxLayout(_containerWidget); + QVBoxLayout* layout = new QVBoxLayout(_containerWidget); _stackWidget = new QStackedWidget(_containerWidget); diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp index f9b1e1643..eb9baa4be 100644 --- a/src/ViewManager.cpp +++ b/src/ViewManager.cpp @@ -1001,9 +1001,9 @@ void ViewManager::saveSessions(KConfigGroup& group) int tab = 1; while (viewIter.hasNext()) { - TerminalDisplay *view = dynamic_cast(viewIter.next()); + TerminalDisplay* view = dynamic_cast(viewIter.next()); Q_ASSERT(view); - Session *session = _sessionMap[view]; + Session* session = _sessionMap[view]; ids << SessionManager::instance()->getRestoreId(session); if (view == activeview) group.writeEntry("Active", tab); unique.insert(session, 1); @@ -1026,12 +1026,12 @@ void ViewManager::restoreSessions(const KConfigGroup& group) { QList ids = group.readEntry("Sessions", QList()); int activeTab = group.readEntry("Active", 0); - TerminalDisplay *display = 0; + TerminalDisplay* display = 0; int tab = 1; foreach(int id, ids) { - Session *session = SessionManager::instance()->idToSession(id); + Session* session = SessionManager::instance()->idToSession(id); createView(session); if (!session->isRunning()) session->run(); @@ -1155,9 +1155,9 @@ void ViewManager::setTabWidthToText(bool useTextWidth) container->setNavigationTextMode(useTextWidth); } -void ViewManager::closeTabFromContainer(ViewContainer *container, QWidget *tab) +void ViewManager::closeTabFromContainer(ViewContainer* container, QWidget* tab) { - SessionController *controller = dynamic_cast(container->viewProperties(tab)); + SessionController* controller = dynamic_cast(container->viewProperties(tab)); Q_ASSERT(controller); if (controller) controller->closeSession() ; diff --git a/src/ViewManager.h b/src/ViewManager.h index 9cc59ab7c..248d23fef 100644 --- a/src/ViewManager.h +++ b/src/ViewManager.h @@ -323,7 +323,7 @@ private slots: void detachView(ViewContainer* container, QWidget* view); - void closeTabFromContainer(ViewContainer *container, QWidget *view); + void closeTabFromContainer(ViewContainer* container, QWidget* view); private: void createView(Session* session, ViewContainer* container, int index); diff --git a/src/XKB.cpp b/src/XKB.cpp index 4fe36f15a..509132015 100644 --- a/src/XKB.cpp +++ b/src/XKB.cpp @@ -54,7 +54,7 @@ int xkb_init() #if 0 // This method doesn't work in all cases. The atom "ScrollLock" doesn't seem // to exist on all XFree versions (at least it's not here with my 3.3.6) - DF -static unsigned int xkb_mask_modifier( XkbDescPtr xkb, const char *name ) +static unsigned int xkb_mask_modifier( XkbDescPtr xkb, const char* name ) { int i; if( !xkb || !xkb->names ) diff --git a/src/ZModemDialog.h b/src/ZModemDialog.h index 63b9d602f..94a60d5c7 100644 --- a/src/ZModemDialog.h +++ b/src/ZModemDialog.h @@ -31,7 +31,7 @@ class ZModemDialog : public KDialog Q_OBJECT public: - ZModemDialog(QWidget *parent, bool modal, const QString &caption); + ZModemDialog(QWidget* parent, bool modal, const QString& caption); /** * Adds a line of text to the progress window diff --git a/src/konsole_wcwidth.cpp b/src/konsole_wcwidth.cpp index 018c348c2..c867b6089 100644 --- a/src/konsole_wcwidth.cpp +++ b/src/konsole_wcwidth.cpp @@ -15,7 +15,7 @@ struct interval { }; /* auxiliary function for binary search in interval table */ -static int bisearch(quint16 ucs, const struct interval *table, int max) { +static int bisearch(quint16 ucs, const struct interval* table, int max) { int min = 0; int mid;