forked from qt-creator/qt-creator
debugger: deactivate thread window operations during stepping
This commit is contained in:
@@ -225,6 +225,7 @@ public slots:
|
|||||||
void scheduleResetLocation()
|
void scheduleResetLocation()
|
||||||
{
|
{
|
||||||
m_stackHandler.scheduleResetLocation();
|
m_stackHandler.scheduleResetLocation();
|
||||||
|
m_threadsHandler.scheduleResetLocation();
|
||||||
m_disassemblerAgent.scheduleResetLocation();
|
m_disassemblerAgent.scheduleResetLocation();
|
||||||
m_locationTimer.setSingleShot(true);
|
m_locationTimer.setSingleShot(true);
|
||||||
m_locationTimer.start(80);
|
m_locationTimer.start(80);
|
||||||
@@ -235,6 +236,7 @@ public slots:
|
|||||||
m_locationTimer.stop();
|
m_locationTimer.stop();
|
||||||
m_locationMark.reset();
|
m_locationMark.reset();
|
||||||
m_stackHandler.resetLocation();
|
m_stackHandler.resetLocation();
|
||||||
|
m_threadsHandler.resetLocation();
|
||||||
m_disassemblerAgent.resetLocation();
|
m_disassemblerAgent.resetLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,8 @@ ThreadsHandler::ThreadsHandler()
|
|||||||
m_positionIcon(QLatin1String(":/debugger/images/location_16.png")),
|
m_positionIcon(QLatin1String(":/debugger/images/location_16.png")),
|
||||||
m_emptyIcon(QLatin1String(":/debugger/images/debugger_empty_14.png"))
|
m_emptyIcon(QLatin1String(":/debugger/images/debugger_empty_14.png"))
|
||||||
{
|
{
|
||||||
|
m_resetLocationScheduled = false;
|
||||||
|
m_contentsValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ThreadsHandler::rowCount(const QModelIndex &parent) const
|
int ThreadsHandler::rowCount(const QModelIndex &parent) const
|
||||||
@@ -194,6 +196,11 @@ QVariant ThreadsHandler::headerData
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Qt::ItemFlags ThreadsHandler::flags(const QModelIndex &index) const
|
||||||
|
{
|
||||||
|
return m_contentsValid ? QAbstractTableModel::flags(index) : Qt::ItemFlags(0);
|
||||||
|
}
|
||||||
|
|
||||||
int ThreadsHandler::currentThreadId() const
|
int ThreadsHandler::currentThreadId() const
|
||||||
{
|
{
|
||||||
if (m_currentIndex < 0 || m_currentIndex >= m_threads.size())
|
if (m_currentIndex < 0 || m_currentIndex >= m_threads.size())
|
||||||
@@ -241,7 +248,9 @@ void ThreadsHandler::setThreads(const Threads &threads)
|
|||||||
m_threads = threads;
|
m_threads = threads;
|
||||||
if (m_currentIndex >= m_threads.size())
|
if (m_currentIndex >= m_threads.size())
|
||||||
m_currentIndex = -1;
|
m_currentIndex = -1;
|
||||||
layoutChanged();
|
m_resetLocationScheduled = false;
|
||||||
|
m_contentsValid = true;
|
||||||
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
Threads ThreadsHandler::threads() const
|
Threads ThreadsHandler::threads() const
|
||||||
@@ -253,7 +262,7 @@ void ThreadsHandler::removeAll()
|
|||||||
{
|
{
|
||||||
m_threads.clear();
|
m_threads.clear();
|
||||||
m_currentIndex = 0;
|
m_currentIndex = 0;
|
||||||
layoutChanged();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadsHandler::notifyRunning()
|
void ThreadsHandler::notifyRunning()
|
||||||
@@ -303,5 +312,19 @@ Threads ThreadsHandler::parseGdbmiThreads(const GdbMi &data, int *currentThread)
|
|||||||
return threads;
|
return threads;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ThreadsHandler::scheduleResetLocation()
|
||||||
|
{
|
||||||
|
m_resetLocationScheduled = true;
|
||||||
|
m_contentsValid = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ThreadsHandler::resetLocation()
|
||||||
|
{
|
||||||
|
if (m_resetLocationScheduled) {
|
||||||
|
m_resetLocationScheduled = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
|
|||||||
@@ -70,17 +70,24 @@ public:
|
|||||||
|
|
||||||
static Threads parseGdbmiThreads(const GdbMi &data, int *currentThread = 0);
|
static Threads parseGdbmiThreads(const GdbMi &data, int *currentThread = 0);
|
||||||
|
|
||||||
|
void resetLocation();
|
||||||
|
void scheduleResetLocation();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||||
QVariant headerData(int section, Qt::Orientation orientation,
|
QVariant headerData(int section, Qt::Orientation orientation,
|
||||||
int role = Qt::DisplayRole) const;
|
int role = Qt::DisplayRole) const;
|
||||||
|
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||||
|
|
||||||
Threads m_threads;
|
Threads m_threads;
|
||||||
int m_currentIndex;
|
int m_currentIndex;
|
||||||
const QIcon m_positionIcon;
|
const QIcon m_positionIcon;
|
||||||
const QIcon m_emptyIcon;
|
const QIcon m_emptyIcon;
|
||||||
|
|
||||||
|
bool m_resetLocationScheduled;
|
||||||
|
bool m_contentsValid;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
Reference in New Issue
Block a user