diff --git a/lib/BlockArray.cpp b/lib/BlockArray.cpp index e4ccf8d..3ffd83f 100644 --- a/lib/BlockArray.cpp +++ b/lib/BlockArray.cpp @@ -41,9 +41,9 @@ BlockArray::BlockArray() : size(0), current(size_t(-1)), index(size_t(-1)), - lastmap(0), + lastmap(nullptr), lastmap_index(size_t(-1)), - lastblock(0), ion(-1), + lastblock(nullptr), ion(-1), length(0) { // lastmap_index = index = current = size_t(-1); @@ -138,7 +138,7 @@ const Block * BlockArray::at(size_t i) if (i > index) { qDebug() << "BlockArray::at() i > index\n"; - return 0; + return nullptr; } // if (index - i >= length) { @@ -151,11 +151,11 @@ const Block * BlockArray::at(size_t i) Q_ASSERT(j < size); unmap(); - Block * block = (Block *)mmap(0, blocksize, PROT_READ, MAP_PRIVATE, ion, j * blocksize); + Block * block = (Block *)mmap(nullptr, blocksize, PROT_READ, MAP_PRIVATE, ion, j * blocksize); if (block == (Block *)-1) { perror("mmap"); - return 0; + return nullptr; } lastmap = block; @@ -172,7 +172,7 @@ void BlockArray::unmap() perror("munmap"); } } - lastmap = 0; + lastmap = nullptr; lastmap_index = size_t(-1); } @@ -193,7 +193,7 @@ bool BlockArray::setHistorySize(size_t newsize) if (!newsize) { delete lastblock; - lastblock = 0; + lastblock = nullptr; if (ion >= 0) { close(ion); } diff --git a/lib/ColorScheme.cpp b/lib/ColorScheme.cpp index c9cc851..4ed61e1 100644 --- a/lib/ColorScheme.cpp +++ b/lib/ColorScheme.cpp @@ -122,25 +122,25 @@ const char* const ColorScheme::translatedColorNames[TABLE_COLORS] = ColorScheme::ColorScheme() { - _table = 0; - _randomTable = 0; + _table = nullptr; + _randomTable = nullptr; _opacity = 1.0; } ColorScheme::ColorScheme(const ColorScheme& other) : _opacity(other._opacity) - ,_table(0) - ,_randomTable(0) + ,_table(nullptr) + ,_randomTable(nullptr) { setName(other.name()); setDescription(other.description()); - if ( other._table != 0 ) + if ( other._table != nullptr ) { for ( int i = 0 ; i < TABLE_COLORS ; i++ ) setColorTableEntry(i,other._table[i]); } - if ( other._randomTable != 0 ) + if ( other._randomTable != nullptr ) { for ( int i = 0 ; i < TABLE_COLORS ; i++ ) { @@ -185,7 +185,7 @@ ColorEntry ColorScheme::colorEntry(int index , uint randomSeed) const ColorEntry entry = colorTable()[index]; if ( randomSeed != 0 && - _randomTable != 0 && + _randomTable != nullptr && !_randomTable[index].isNull() ) { const RandomizationRange& range = _randomTable[index]; @@ -213,7 +213,7 @@ void ColorScheme::getColorTable(ColorEntry* table , uint randomSeed) const } bool ColorScheme::randomizedBackgroundColor() const { - return _randomTable == 0 ? false : !_randomTable[1].isNull(); + return _randomTable == nullptr ? false : !_randomTable[1].isNull(); } void ColorScheme::setRandomizedBackgroundColor(bool randomize) { @@ -238,7 +238,7 @@ void ColorScheme::setRandomizationRange( int index , quint16 hue , quint8 satura Q_ASSERT( hue <= MAX_HUE ); Q_ASSERT( index >= 0 && index < TABLE_COLORS ); - if ( _randomTable == 0 ) + if ( _randomTable == nullptr ) _randomTable = new RandomizationRange[TABLE_COLORS]; _randomTable[index].hue = hue; @@ -821,7 +821,7 @@ const ColorScheme* ColorSchemeManager::findColorScheme(const QString& name) qDebug() << "Could not find color scheme - " << name; - return 0; + return nullptr; } } Q_GLOBAL_STATIC(ColorSchemeManager, theColorSchemeManager) diff --git a/lib/Emulation.cpp b/lib/Emulation.cpp index a5cfc71..bd75af3 100644 --- a/lib/Emulation.cpp +++ b/lib/Emulation.cpp @@ -51,10 +51,10 @@ using namespace Konsole; Emulation::Emulation() : - _currentScreen(0), - _codec(0), - _decoder(0), - _keyTranslator(0), + _currentScreen(nullptr), + _codec(nullptr), + _decoder(nullptr), + _keyTranslator(nullptr), _usesMouse(false), _bracketedPasteMode(false) { @@ -398,7 +398,7 @@ bool ExtendedCharTable::extendedCharMatch(ushort hash , ushort* unicodePoints , // compare given length with stored sequence length ( given as the first ushort in the // stored buffer ) - if ( entry == 0 || entry[0] != length ) + if ( entry == nullptr || entry[0] != length ) return false; // if the lengths match, each character must be checked. the stored buffer starts at // entry[1] @@ -458,7 +458,7 @@ ushort* ExtendedCharTable::lookupExtendedChar(ushort hash , ushort& length) cons else { length = 0; - return 0; + return nullptr; } } diff --git a/lib/Filter.cpp b/lib/Filter.cpp index 0cc5933..f219292 100644 --- a/lib/Filter.cpp +++ b/lib/Filter.cpp @@ -98,13 +98,13 @@ Filter::HotSpot* FilterChain::hotSpotAt(int line , int column) const { Filter* filter = iter.next(); Filter::HotSpot* spot = filter->hotSpotAt(line,column); - if ( spot != 0 ) + if ( spot != nullptr ) { return spot; } } - return 0; + return nullptr; } QList FilterChain::hotSpots() const @@ -121,8 +121,8 @@ QList FilterChain::hotSpots() const //QList FilterChain::hotSpotsAtLine(int line) const; TerminalImageFilterChain::TerminalImageFilterChain() -: _buffer(0) -, _linePositions(0) +: _buffer(nullptr) +, _linePositions(nullptr) { } @@ -180,8 +180,8 @@ void TerminalImageFilterChain::setImage(const Character* const image , int lines } Filter::Filter() : -_linePositions(0), -_buffer(0) +_linePositions(nullptr), +_buffer(nullptr) { } @@ -275,7 +275,7 @@ Filter::HotSpot* Filter::hotSpotAt(int line , int column) const return spot; } - return 0; + return nullptr; } Filter::HotSpot::HotSpot(int startLine , int startColumn , int endLine , int endColumn) diff --git a/lib/History.cpp b/lib/History.cpp index b297b0e..9cbf498 100644 --- a/lib/History.cpp +++ b/lib/History.cpp @@ -89,7 +89,7 @@ FIXME: There is noticeable decrease in speed, also. Perhaps, HistoryFile::HistoryFile() : ion(-1), length(0), - fileMap(0) + fileMap(nullptr) { if (tmpFile.open()) { @@ -109,15 +109,15 @@ HistoryFile::~HistoryFile() //to avoid this. void HistoryFile::map() { - Q_ASSERT( fileMap == 0 ); + Q_ASSERT( fileMap == nullptr ); - fileMap = (char*)mmap( 0 , length , PROT_READ , MAP_PRIVATE , ion , 0 ); + fileMap = (char*)mmap( nullptr , length , PROT_READ , MAP_PRIVATE , ion , 0 ); //if mmap'ing fails, fall back to the read-lseek combination if ( fileMap == MAP_FAILED ) { readWriteBalance = 0; - fileMap = 0; + fileMap = nullptr; //qDebug() << __FILE__ << __LINE__ << ": mmap'ing history failed. errno = " << errno; } } @@ -127,12 +127,12 @@ void HistoryFile::unmap() int result = munmap( fileMap , length ); Q_ASSERT( result == 0 ); Q_UNUSED( result ); - fileMap = 0; + fileMap = nullptr; } bool HistoryFile::isMapped() const { - return (fileMap != 0); + return (fileMap != nullptr); } void HistoryFile::add(const unsigned char* bytes, int len) @@ -537,7 +537,7 @@ void* CompactHistoryBlock::allocate ( size_t length ) { Q_ASSERT ( length > 0 ); if ( tail-blockStart+length > blockLength ) - return NULL; + return nullptr; void* block = tail; tail += length; @@ -628,9 +628,9 @@ CompactHistoryLine::CompactHistoryLine ( const TextLine& line, CompactHistoryBlo //kDebug() << "number of different formats in string: " << formatLength; formatArray = (CharacterFormat*) blockList.allocate(sizeof(CharacterFormat)*formatLength); - Q_ASSERT (formatArray!=NULL); + Q_ASSERT (formatArray!=nullptr); text = (quint16*) blockList.allocate(sizeof(quint16)*line.size()); - Q_ASSERT (text!=NULL); + Q_ASSERT (text!=nullptr); length=line.size(); wrapped=false; @@ -923,7 +923,7 @@ HistoryScroll* HistoryTypeFile::scroll(HistoryScroll *old) const HistoryScroll *newScroll = new HistoryScrollFile(m_fileName); Character line[LINE_SIZE]; - int lines = (old != 0) ? old->getLines() : 0; + int lines = (old != nullptr) ? old->getLines() : 0; for(int i = 0; i < lines; i++) { int size = old->getLineLen(i); diff --git a/lib/History.h b/lib/History.h index 16469d0..59da314 100644 --- a/lib/History.h +++ b/lib/History.h @@ -293,7 +293,7 @@ public: CompactHistoryBlock(){ blockLength = 4096*64; // 256kb - head = (quint8*) mmap(0, blockLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0); + head = (quint8*) mmap(nullptr, blockLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0); //head = (quint8*) malloc(blockLength); Q_ASSERT(head != MAP_FAILED); tail = blockStart = head; diff --git a/lib/KeyboardTranslator.cpp b/lib/KeyboardTranslator.cpp index 9d66aa2..32d5287 100644 --- a/lib/KeyboardTranslator.cpp +++ b/lib/KeyboardTranslator.cpp @@ -109,7 +109,7 @@ const KeyboardTranslator* KeyboardTranslatorManager::findTranslator(const QStrin KeyboardTranslator* translator = loadTranslator(name); - if ( translator != 0 ) + if ( translator != nullptr ) _translators[name] = translator; else if ( !name.isEmpty() ) qDebug() << "Unable to load translator" << name; @@ -155,7 +155,7 @@ KeyboardTranslator* KeyboardTranslatorManager::loadTranslator(const QString& nam QFile source(path); if (name.isEmpty() || !source.open(QIODevice::ReadOnly | QIODevice::Text)) - return 0; + return nullptr; return loadTranslator(&source,name); } @@ -192,7 +192,7 @@ KeyboardTranslator* KeyboardTranslatorManager::loadTranslator(QIODevice* source, else { delete translator; - return 0; + return nullptr; } } diff --git a/lib/Pty.cpp b/lib/Pty.cpp index 87484be..714101f 100644 --- a/lib/Pty.cpp +++ b/lib/Pty.cpp @@ -331,8 +331,8 @@ void Pty::setupChildProcess() action.sa_handler = SIG_DFL; action.sa_flags = 0; for (int signal=1;signal < NSIG; signal++) { - sigaction(signal,&action,0L); + sigaction(signal,&action,nullptr); sigaddset(&sigset, signal); } - sigprocmask(SIG_UNBLOCK, &sigset, NULL); + sigprocmask(SIG_UNBLOCK, &sigset, nullptr); } diff --git a/lib/Pty.h b/lib/Pty.h index 6c96c3e..f427a53 100644 --- a/lib/Pty.h +++ b/lib/Pty.h @@ -70,13 +70,13 @@ Q_OBJECT * To start the terminal process, call the run() method with the * name of the program to start and appropriate arguments. */ - explicit Pty(QObject* parent = 0); + explicit Pty(QObject* parent = nullptr); /** * Construct a process using an open pty master. * See KPtyProcess::KPtyProcess() */ - explicit Pty(int ptyMasterFd, QObject* parent = 0); + explicit Pty(int ptyMasterFd, QObject* parent = nullptr); ~Pty() override; diff --git a/lib/Screen.cpp b/lib/Screen.cpp index ea635e5..cb88fd3 100644 --- a/lib/Screen.cpp +++ b/lib/Screen.cpp @@ -1359,7 +1359,7 @@ void Screen::setScroll(const HistoryType& t , bool copyPreviousScroll) else { HistoryScroll* oldScroll = history; - history = t.scroll(0); + history = t.scroll(nullptr); delete oldScroll; } } diff --git a/lib/ScreenWindow.cpp b/lib/ScreenWindow.cpp index 640465f..22e9b08 100644 --- a/lib/ScreenWindow.cpp +++ b/lib/ScreenWindow.cpp @@ -30,7 +30,7 @@ using namespace Konsole; ScreenWindow::ScreenWindow(QObject* parent) : QObject(parent) - , _windowBuffer(0) + , _windowBuffer(nullptr) , _windowBufferSize(0) , _bufferNeedsUpdate(true) , _windowLines(1) @@ -59,7 +59,7 @@ Character* ScreenWindow::getImage() { // reallocate internal buffer if the window size has changed int size = windowLines() * windowColumns(); - if (_windowBuffer == 0 || _windowBufferSize != size) + if (_windowBuffer == nullptr || _windowBufferSize != size) { delete[] _windowBuffer; _windowBufferSize = size; diff --git a/lib/ScreenWindow.h b/lib/ScreenWindow.h index 81d1f97..79613d7 100644 --- a/lib/ScreenWindow.h +++ b/lib/ScreenWindow.h @@ -64,7 +64,7 @@ public: * to notify the window when the associated screen has changed and synchronize selection updates * between all views on a session. */ - ScreenWindow(QObject* parent = 0); + ScreenWindow(QObject* parent = nullptr); ~ScreenWindow() override; /** Sets the screen which this window looks onto */ diff --git a/lib/SearchBar.h b/lib/SearchBar.h index 89d7eb2..0f4299b 100644 --- a/lib/SearchBar.h +++ b/lib/SearchBar.h @@ -27,7 +27,7 @@ class SearchBar : public QWidget { Q_OBJECT public: - SearchBar(QWidget* parent = 0); + SearchBar(QWidget* parent = nullptr); ~SearchBar() override; virtual void show(); QString searchText(); diff --git a/lib/Session.cpp b/lib/Session.cpp index 0182f9f..4146459 100644 --- a/lib/Session.cpp +++ b/lib/Session.cpp @@ -50,8 +50,8 @@ int Session::lastSessionId = 0; Session::Session(QObject* parent) : QObject(parent), - _shellProcess(0) - , _emulation(0) + _shellProcess(nullptr) + , _emulation(nullptr) , _monitorActivity(false) , _monitorSilence(false) , _notifiedActivity(false) @@ -172,7 +172,7 @@ void Session::addView(TerminalDisplay * widget) _views.append(widget); - if ( _emulation != 0 ) { + if ( _emulation != nullptr ) { // connect emulation - view signals and slots connect( widget , SIGNAL(keyPressedSignal(QKeyEvent *)) , _emulation , SLOT(sendKeyEvent(QKeyEvent *)) ); @@ -220,19 +220,19 @@ void Session::removeView(TerminalDisplay * widget) { _views.removeAll(widget); - disconnect(widget,0,this,0); + disconnect(widget,nullptr,this,nullptr); - if ( _emulation != 0 ) { + if ( _emulation != nullptr ) { // disconnect // - key presses signals from widget // - mouse activity signals from widget // - string sending signals from widget // // ... and any other signals connected in addView() - disconnect( widget, 0, _emulation, 0); + disconnect( widget, nullptr, _emulation, nullptr); // disconnect state change signals emitted by emulation - disconnect( _emulation , 0 , widget , 0); + disconnect( _emulation , nullptr , widget , nullptr); } // close the session automatically when the last view is removed diff --git a/lib/Session.h b/lib/Session.h index ab63b51..992b9f5 100644 --- a/lib/Session.h +++ b/lib/Session.h @@ -71,7 +71,7 @@ public: * falls back to using the program specified in the SHELL environment * variable. */ - Session(QObject* parent = 0); + Session(QObject* parent = nullptr); ~Session() override; /** diff --git a/lib/TerminalCharacterDecoder.cpp b/lib/TerminalCharacterDecoder.cpp index 579dedf..92e8293 100644 --- a/lib/TerminalCharacterDecoder.cpp +++ b/lib/TerminalCharacterDecoder.cpp @@ -33,7 +33,7 @@ using namespace Konsole; PlainTextDecoder::PlainTextDecoder() - : _output(0) + : _output(nullptr) , _includeTrailingWhitespace(true) , _recordLinePositions(false) { @@ -55,7 +55,7 @@ void PlainTextDecoder::begin(QTextStream* output) } void PlainTextDecoder::end() { - _output = 0; + _output = nullptr; } void PlainTextDecoder::setRecordLinePositions(bool record) @@ -109,7 +109,7 @@ void PlainTextDecoder::decodeLine(const Character* const characters, int count, } HTMLDecoder::HTMLDecoder() : - _output(0) + _output(nullptr) ,_colorTable(base_color_table) ,_innerSpanOpen(false) ,_lastRendition(DEFAULT_RENDITION) @@ -139,7 +139,7 @@ void HTMLDecoder::end() *_output << QString::fromStdWString(text); - _output = 0; + _output = nullptr; } diff --git a/lib/TerminalDisplay.cpp b/lib/TerminalDisplay.cpp index 35f6b4b..b666a28 100644 --- a/lib/TerminalDisplay.cpp +++ b/lib/TerminalDisplay.cpp @@ -128,7 +128,7 @@ void TerminalDisplay::setScreenWindow(ScreenWindow* window) // disconnect existing screen window if any if ( _screenWindow ) { - disconnect( _screenWindow , 0 , this , 0 ); + disconnect( _screenWindow , nullptr , this , nullptr ); } _screenWindow = window; @@ -312,9 +312,9 @@ void TerminalDisplay::setFont(const QFont &) TerminalDisplay::TerminalDisplay(QWidget *parent) :QWidget(parent) -,_screenWindow(0) +,_screenWindow(nullptr) ,_allowBell(true) -,_gridLayout(0) +,_gridLayout(nullptr) ,_fontHeight(1) ,_fontWidth(1) ,_fontAscent(1) @@ -325,7 +325,7 @@ TerminalDisplay::TerminalDisplay(QWidget *parent) ,_usedColumns(1) ,_contentHeight(1) ,_contentWidth(1) -,_image(0) +,_image(nullptr) ,_randomSeed(0) ,_resizing(false) ,_terminalSizeHint(false) @@ -349,10 +349,10 @@ TerminalDisplay::TerminalDisplay(QWidget *parent) ,_tripleClickMode(SelectWholeLine) ,_isFixedSize(false) ,_possibleTripleClick(false) -,_resizeWidget(0) -,_resizeTimer(0) +,_resizeWidget(nullptr) +,_resizeTimer(nullptr) ,_flowControlWarningEnabled(false) -,_outputSuspendedLabel(0) +,_outputSuspendedLabel(nullptr) ,_lineSpacing(0) ,_colorsInverted(false) ,_blendColor(qRgba(0,0,0,0xff)) @@ -941,7 +941,7 @@ void TerminalDisplay::scrollImage(int lines , const QRect& screenWindowRegion) // return if there is nothing to do if ( lines == 0 - || _image == 0 + || _image == nullptr || !region.isValid() || (region.top() + abs(lines)) >= region.bottom() || this->_lines <= region.height() ) return; diff --git a/lib/TerminalDisplay.h b/lib/TerminalDisplay.h index fb55a58..5105382 100644 --- a/lib/TerminalDisplay.h +++ b/lib/TerminalDisplay.h @@ -82,7 +82,7 @@ class KONSOLEPRIVATE_EXPORT TerminalDisplay : public QWidget public: /** Constructs a new terminal display widget with the specified parent. */ - TerminalDisplay(QWidget *parent=0); + TerminalDisplay(QWidget *parent=nullptr); ~TerminalDisplay() override; /** Returns the terminal color palette used by the display. */ diff --git a/lib/Vt102Emulation.cpp b/lib/Vt102Emulation.cpp index cf677c2..622550e 100644 --- a/lib/Vt102Emulation.cpp +++ b/lib/Vt102Emulation.cpp @@ -1341,8 +1341,8 @@ char Vt102Emulation::eraseChar() const { KeyboardTranslator::Entry entry = _keyTranslator->findEntry( Qt::Key_Backspace, - 0, - 0); + nullptr, + nullptr); if ( entry.text().count() > 0 ) return entry.text().at(0); else diff --git a/lib/kprocess.h b/lib/kprocess.h index 386f870..9fbfb4e 100644 --- a/lib/kprocess.h +++ b/lib/kprocess.h @@ -77,7 +77,7 @@ public: /** * Constructor */ - explicit KProcess(QObject *parent = 0); + explicit KProcess(QObject *parent = nullptr); /** * Destructor diff --git a/lib/kpty.cpp b/lib/kpty.cpp index b42bf95..2b70dd2 100644 --- a/lib/kpty.cpp +++ b/lib/kpty.cpp @@ -544,7 +544,7 @@ void KPty::login(const char * user, const char * remotehost) # ifdef HAVE_UTMPX gettimeofday(&l_struct.ut_tv, 0); # else - l_struct.ut_time = time(0); + l_struct.ut_time = time(nullptr); # endif # ifdef HAVE_LOGIN @@ -646,7 +646,7 @@ void KPty::logout() } endutxent(); # else - ut->ut_time = time(0); + ut->ut_time = time(nullptr); pututline(ut); } endutent(); diff --git a/lib/kpty.h b/lib/kpty.h index ab34f6e..6415512 100644 --- a/lib/kpty.h +++ b/lib/kpty.h @@ -95,7 +95,7 @@ public: * of the client. For local logins from inside an X session it should * be the name of the X display. Otherwise it should be empty. */ - void login(const char * user = 0, const char * remotehost = 0); + void login(const char * user = nullptr, const char * remotehost = nullptr); /** * Removes the utmp entry for this tty. diff --git a/lib/kptydevice.cpp b/lib/kptydevice.cpp index 90b4a58..983d4ea 100644 --- a/lib/kptydevice.cpp +++ b/lib/kptydevice.cpp @@ -74,7 +74,7 @@ static void qt_ignore_sigpipe() struct sigaction noaction; memset(&noaction, 0, sizeof(noaction)); noaction.sa_handler = SIG_IGN; - sigaction(SIGPIPE, &noaction, 0); + sigaction(SIGPIPE, &noaction, nullptr); } } @@ -211,7 +211,7 @@ bool KPtyDevicePrivate::doWait(int msecs, bool reading) struct timeval tv, *tvp; if (msecs < 0) - tvp = 0; + tvp = nullptr; else { tv.tv_sec = msecs / 1000; tv.tv_usec = (msecs % 1000) * 1000; @@ -243,7 +243,7 @@ bool KPtyDevicePrivate::doWait(int msecs, bool reading) } #endif - switch (select(q->masterFd() + 1, &rfds, &wfds, 0, tvp)) { + switch (select(q->masterFd() + 1, &rfds, &wfds, nullptr, tvp)) { case -1: if (errno == EINTR) break; diff --git a/lib/kptydevice.h b/lib/kptydevice.h index 8b23bce..a379af1 100644 --- a/lib/kptydevice.h +++ b/lib/kptydevice.h @@ -55,7 +55,7 @@ public: /** * Constructor */ - KPtyDevice(QObject *parent = 0); + KPtyDevice(QObject *parent = nullptr); /** * Destructor: @@ -339,7 +339,7 @@ struct KPtyDevicePrivate : public KPtyPrivate { KPtyDevicePrivate(KPty* parent) : KPtyPrivate(parent), emittedReadyRead(false), emittedBytesWritten(false), - readNotifier(0), writeNotifier(0) + readNotifier(nullptr), writeNotifier(nullptr) { } diff --git a/lib/kptyprocess.h b/lib/kptyprocess.h index 9172062..0d3a04a 100644 --- a/lib/kptyprocess.h +++ b/lib/kptyprocess.h @@ -74,7 +74,7 @@ public: /** * Constructor */ - explicit KPtyProcess(QObject *parent = 0); + explicit KPtyProcess(QObject *parent = nullptr); /** * Construct a process using an open pty master. @@ -83,7 +83,7 @@ public: * The process does not take ownership of the descriptor; * it will not be automatically closed at any point. */ - KPtyProcess(int ptyMasterFd, QObject *parent = 0); + KPtyProcess(int ptyMasterFd, QObject *parent = nullptr); /** * Destructor diff --git a/lib/qtermwidget.cpp b/lib/qtermwidget.cpp index 4a5172a..165b431 100644 --- a/lib/qtermwidget.cpp +++ b/lib/qtermwidget.cpp @@ -50,7 +50,7 @@ void *createTermWidget(int startnow, void *parent) } struct TermWidgetImpl { - TermWidgetImpl(QWidget* parent = 0); + TermWidgetImpl(QWidget* parent = nullptr); TerminalDisplay *m_terminalDisplay; Session *m_session; @@ -425,7 +425,7 @@ void QTermWidget::setTextCodec(QTextCodec *codec) void QTermWidget::setColorScheme(const QString& origName) { - const ColorScheme *cs = 0; + const ColorScheme *cs = nullptr; const bool isFile = QFile::exists(origName); const QString& name = isFile ? diff --git a/lib/qtermwidget.h b/lib/qtermwidget.h index 142cb4a..ea0e828 100644 --- a/lib/qtermwidget.h +++ b/lib/qtermwidget.h @@ -51,9 +51,9 @@ public: //Creation of widget QTermWidget(int startnow, // 1 = start shell programm immediatelly - QWidget * parent = 0); + QWidget * parent = nullptr); // A dummy constructor for Qt Designer. startnow is 1 by default - QTermWidget(QWidget *parent = 0); + QTermWidget(QWidget *parent = nullptr); ~QTermWidget() override;