From a9a27f084722ec54260ebfca0fcc5ae56b731ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Fri, 16 Apr 2010 12:51:15 +0200 Subject: [PATCH] Removed some dead code --- .../images/insert_line_small.png | Bin 584 -> 0 bytes src/plugins/projectexplorer/outputwindow.cpp | 25 +----- src/plugins/projectexplorer/outputwindow.h | 78 ------------------ .../projectexplorer/projectexplorer.qrc | 1 - .../projectexplorerconstants.h | 1 - .../projectexplorer/runconfiguration.h | 2 + 6 files changed, 3 insertions(+), 104 deletions(-) delete mode 100644 src/plugins/projectexplorer/images/insert_line_small.png diff --git a/src/plugins/projectexplorer/images/insert_line_small.png b/src/plugins/projectexplorer/images/insert_line_small.png deleted file mode 100644 index e80f06089f16864ff29b401660c534122065249f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 584 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7*pj^6T^Rm@;DWu&Co?cG za29w(7Bet#3xhBt!>l^E4M_{^mp)|j7WU|_uJ>Eak-aeC=we~*wr ziKF%3&(1bqY@B+2WzY0X&cCxK9MHJf*x_=-RU$A!d!g&>wx}y!EoOo)DqOp+x~_I` zQ4-fvi@EN_;@sAxcwttC+UvbPi>r;dw;E|0>$6!EJS?(5xAXb$b9K|fr8ok{+*LUwVU3z7Ixc!QYVONrRtS`1{^~IImp3uOvL0+TL z=6avug~NY0vKVJqu8O+1_FFN>CV%UIm$R2F*EM_Z8hDz&1?-bAX@L%_FWyrIe`S$WI%G=x5C&_UnOIYzAPg~9U ztpDIk>GsZVECti;jAsexSlTfykI^fSUHmym`kLV60*wg8n|_U#PO9_FW3P2)ep@?h zI`@X0*L!|1)$pFa)6-*L-jS@E$2+&Bomm#(s<8X%hM+t5UVjvc(7fTmpy#-N;fAZh zpQeHn?KhvOCrRz@@qV-3nrZ7NQKttYj$WO))+w8#7u?y;S7%{S-@OBoq>UY!PC{xWt~$(697m${^kGx diff --git a/src/plugins/projectexplorer/outputwindow.cpp b/src/plugins/projectexplorer/outputwindow.cpp index a4c15c1c02f..da7cc1e1fe8 100644 --- a/src/plugins/projectexplorer/outputwindow.cpp +++ b/src/plugins/projectexplorer/outputwindow.cpp @@ -63,13 +63,6 @@ static const int MaxBlockCount = 100000; OutputPane::OutputPane() : m_mainWidget(new QWidget) { -// m_insertLineButton = new QToolButton; -// m_insertLineButton->setIcon(QIcon(ProjectExplorer::Constants::ICON_INSERT_LINE)); -// m_insertLineButton->setText(tr("Insert line")); -// m_insertLineButton->setToolTip(tr("Insert line")); -// m_insertLineButton->setAutoRaise(true); -// connect(m_insertLineButton, SIGNAL(clicked()), this, SLOT(insertLine())); - QIcon runIcon(Constants::ICON_RUN); runIcon.addFile(Constants::ICON_RUN_SMALL); @@ -141,8 +134,7 @@ QWidget *OutputPane::outputWidget(QWidget *) QList OutputPane::toolBarWidgets() const { - return QList() << m_reRunButton << m_stopButton - ; // << m_insertLineButton; + return QList() << m_reRunButton << m_stopButton; } QString OutputPane::name() const @@ -238,13 +230,6 @@ void OutputPane::showTabFor(RunControl *rc) m_tabWidget->setCurrentWidget(ow); } -void OutputPane::insertLine() -{ - OutputWindow *currentWindow = qobject_cast(m_tabWidget->currentWidget()); - if (currentWindow) - currentWindow->clear(); -} - void OutputPane::reRunRunControl() { int index = m_tabWidget->currentIndex(); @@ -480,14 +465,6 @@ void OutputWindow::appendOutputInline(const QString &out) enableUndoRedo(); } -void OutputWindow::insertLine() -{ - m_scrollToBottom = true; - setMaximumBlockCount(MaxBlockCount); - appendPlainText(QString()); - enableUndoRedo(); -} - void OutputWindow::grayOutOldContent() { QTextCursor cursor = textCursor(); diff --git a/src/plugins/projectexplorer/outputwindow.h b/src/plugins/projectexplorer/outputwindow.h index 293b6a44c27..75024514fac 100644 --- a/src/plugins/projectexplorer/outputwindow.h +++ b/src/plugins/projectexplorer/outputwindow.h @@ -96,7 +96,6 @@ public slots: void coreAboutToClose(); private slots: - void insertLine(); void reRunRunControl(); void stopRunControl(); void closeTab(int index); @@ -126,7 +125,6 @@ public: void appendOutput(const QString &out); void appendOutputInline(const QString &out); - void insertLine(); void grayOutOldContent(); void showEvent(QShowEvent *); @@ -147,82 +145,6 @@ private: bool m_mousePressed; }; -#if 0 -class OutputWindow - : public QAbstractScrollArea -{ - Q_OBJECT - - int max_lines; - bool same_height; - int width_used; - bool block_scroll; - QStringList lines; - QBasicTimer autoscroll_timer; - int autoscroll; - QPoint lastMouseMove; - - - struct Selection { - Selection():line(0), pos(0){} - int line; - int pos; - - bool operator==(const Selection &other) const - { return line == other.line && pos == other.pos; } - bool operator!=(const Selection &other) const - { return !(*this == other); } - bool operator<(const Selection &other) const - { return line < other.line || (line == other.line && pos < other.pos); } - bool operator>=(const Selection &other) const - { return !(*this < other); } - bool operator<=(const Selection &other) const - { return line < other.line || (line == other.line && pos == other.pos); } - bool operator>(const Selection &other) const - { return !(*this <= other); } - }; - - Selection selection_start, selection_end; - void changed(); - bool getCursorPos(int *lineNumber, int *position, const QPoint &pos); - -public: - OutputWindow(QWidget *parent = 0); - ~OutputWindow(); - - void setNumberOfLines(int max); - int numberOfLines() const; - - bool hasSelectedText() const; - void clearSelection(); - - QString selectedText() const; - - void appendOutput(const QString &out); - void insertLine() { - appendOutput(QChar(QChar::ParagraphSeparator)); - } - - -public slots: - void clear(); - void copy(); - void selectAll(); - -signals: - void showPage(); - -protected: - void scrollContentsBy(int dx, int dy); - void keyPressEvent(QKeyEvent *e); - void paintEvent(QPaintEvent *e); - void mousePressEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); - void mouseMoveEvent(QMouseEvent *e); - void timerEvent(QTimerEvent *e); - void contextMenuEvent(QContextMenuEvent * e); -}; -#endif // 0 } // namespace Internal } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/projectexplorer.qrc b/src/plugins/projectexplorer/projectexplorer.qrc index e5e799f0bbf..68c6d21728d 100644 --- a/src/plugins/projectexplorer/projectexplorer.qrc +++ b/src/plugins/projectexplorer/projectexplorer.qrc @@ -7,7 +7,6 @@ images/debugger_start.png images/debugger_start_small.png images/filtericon.png - images/insert_line_small.png images/projectexplorer.png images/rebuild.png images/rebuild_small.png diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h index eacf0f8399d..390ba26fc4f 100644 --- a/src/plugins/projectexplorer/projectexplorerconstants.h +++ b/src/plugins/projectexplorer/projectexplorerconstants.h @@ -163,7 +163,6 @@ const char * const ICON_REBUILD_SMALL = ":/projectexplorer/images/rebuild_smal const char * const ICON_RUN = ":/projectexplorer/images/run.png"; const char * const ICON_RUN_SMALL = ":/projectexplorer/images/run_small.png"; const char * const ICON_SESSION = ":/projectexplorer/images/session.png"; -const char * const ICON_INSERT_LINE = ":/projectexplorer/images/insert_line_small.png"; const char * const ICON_DEBUG = ":/projectexplorer/images/debugger_start.png"; const char * const ICON_DEBUG_SMALL = ":/projectexplorer/images/debugger_start_small.png"; const char * const ICON_CLOSETAB = ":/projectexplorer/images/closetab.png"; diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index e3b03e59b7f..cb38d2a32e9 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -174,8 +174,10 @@ signals: void error(RunControl *, const QString &error); void started(); void finished(); + public slots: void bringApplicationToForeground(qint64 pid); + private slots: void bringApplicationToForegroundInternal();