Removed some dead code

This commit is contained in:
Thorbjørn Lindeijer
2010-04-16 12:51:15 +02:00
parent 2ab7d2eafc
commit a9a27f0847
6 changed files with 3 additions and 104 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 B

View File

@@ -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<QWidget*> OutputPane::toolBarWidgets() const
{
return QList<QWidget*>() << m_reRunButton << m_stopButton
; // << m_insertLineButton;
return QList<QWidget*>() << 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<OutputWindow *>(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();

View File

@@ -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

View File

@@ -7,7 +7,6 @@
<file>images/debugger_start.png</file>
<file>images/debugger_start_small.png</file>
<file>images/filtericon.png</file>
<file>images/insert_line_small.png</file>
<file>images/projectexplorer.png</file>
<file>images/rebuild.png</file>
<file>images/rebuild_small.png</file>

View File

@@ -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";

View File

@@ -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();