mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-24 05:22:06 +08:00
removes no longer required debug prints
This commit is contained in:
parent
f110ad8ec7
commit
0eea083f07
@ -195,7 +195,7 @@ bool ContainerWidget::showSectionContent(const SectionContent::RefPtr& sc)
|
|||||||
|
|
||||||
// Already visible?
|
// Already visible?
|
||||||
// TODO
|
// TODO
|
||||||
qDebug("Unable to show SectionContent, don't know where 8-/ (already visible?)");
|
qWarning("Unable to show SectionContent, don't know where 8-/ (already visible?)");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,8 +385,6 @@ bool ContainerWidget::restoreState(const QByteArray& data)
|
|||||||
if (data.isEmpty())
|
if (data.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
qDebug() << "Begin to restore state";
|
|
||||||
|
|
||||||
ADS_NS_SER::InMemoryReader reader(data);
|
ADS_NS_SER::InMemoryReader reader(data);
|
||||||
if (!reader.initReadHeader())
|
if (!reader.initReadHeader())
|
||||||
return false;
|
return false;
|
||||||
@ -397,13 +395,6 @@ bool ContainerWidget::restoreState(const QByteArray& data)
|
|||||||
{
|
{
|
||||||
restoreHierarchy(hierarchyData);
|
restoreHierarchy(hierarchyData);
|
||||||
}
|
}
|
||||||
// QByteArray sectionIndexData;
|
|
||||||
// if (reader.read(ADS_NS_SER::ET_SectionIndex, sectionIndexData))
|
|
||||||
// {
|
|
||||||
// // do we need it?
|
|
||||||
// }
|
|
||||||
|
|
||||||
qDebug() << "End of restore state";
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -702,8 +693,6 @@ QByteArray ContainerWidget::saveHierarchy() const
|
|||||||
... todo ...
|
... todo ...
|
||||||
ENDIF
|
ENDIF
|
||||||
*/
|
*/
|
||||||
qDebug() << "Begin save state";
|
|
||||||
|
|
||||||
QByteArray ba;
|
QByteArray ba;
|
||||||
QDataStream out(&ba, QIODevice::WriteOnly);
|
QDataStream out(&ba, QIODevice::WriteOnly);
|
||||||
out.setVersion(QDataStream::Qt_4_5);
|
out.setVersion(QDataStream::Qt_4_5);
|
||||||
@ -765,7 +754,6 @@ QByteArray ContainerWidget::saveHierarchy() const
|
|||||||
out << -1;
|
out << -1;
|
||||||
qWarning() << "Oh noooz.. Something went wrong. There are too many items in _mainLayout.";
|
qWarning() << "Oh noooz.. Something went wrong. There are too many items in _mainLayout.";
|
||||||
}
|
}
|
||||||
qDebug() << "End save state";
|
|
||||||
return ba;
|
return ba;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1057,7 +1045,6 @@ bool ContainerWidget::restoreFloatingWidgets(QDataStream& in, int version, QList
|
|||||||
in >> geom;
|
in >> geom;
|
||||||
bool visible = false;
|
bool visible = false;
|
||||||
in >> visible;
|
in >> visible;
|
||||||
qDebug() << "Restore FloatingWidget" << uname << geom << visible;
|
|
||||||
|
|
||||||
const SectionContent::RefPtr sc = SCLookupMapByName(this).value(uname).toStrongRef();
|
const SectionContent::RefPtr sc = SCLookupMapByName(this).value(uname).toStrongRef();
|
||||||
if (!sc)
|
if (!sc)
|
||||||
@ -1176,7 +1163,7 @@ bool ContainerWidget::restoreSectionWidgets(QDataStream& in, int version, QSplit
|
|||||||
// Unknown
|
// Unknown
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << QString();
|
qWarning() << "Unknown object type during restore";
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -1215,7 +1202,6 @@ void ContainerWidget::onActiveTabChanged()
|
|||||||
SectionTitleWidget* stw = qobject_cast<SectionTitleWidget*>(sender());
|
SectionTitleWidget* stw = qobject_cast<SectionTitleWidget*>(sender());
|
||||||
if (stw)
|
if (stw)
|
||||||
{
|
{
|
||||||
qDebug() << "Active tab changed" << stw->_content->uid() << stw->isActiveTab();
|
|
||||||
emit activeTabChanged(stw->_content, stw->isActiveTab());
|
emit activeTabChanged(stw->_content, stw->isActiveTab());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "ads/DropOverlay.h"
|
#include "ads/DropOverlay.h"
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QPaintEvent>
|
#include <QPaintEvent>
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
|
|
||||||
#include "ads/FloatingWidget.h"
|
#include "ads/FloatingWidget.h"
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QSizePolicy>
|
#include <QSizePolicy>
|
||||||
@ -52,7 +50,6 @@ FloatingWidget::FloatingWidget(ContainerWidget* container, SectionContent::RefPt
|
|||||||
|
|
||||||
FloatingWidget::~FloatingWidget()
|
FloatingWidget::~FloatingWidget()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
_container->_floatings.removeAll(this); // Note: I don't like this here, but we have to remove it from list...
|
_container->_floatings.removeAll(this); // Note: I don't like this here, but we have to remove it from list...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "ads/SectionContent.h"
|
#include "ads/SectionContent.h"
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "ads/SectionContentWidget.h"
|
#include "ads/SectionContentWidget.h"
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
|
|
||||||
ADS_NAMESPACE_BEGIN
|
ADS_NAMESPACE_BEGIN
|
||||||
@ -9,8 +8,6 @@ SectionContentWidget::SectionContentWidget(SectionContent::RefPtr c, QWidget* pa
|
|||||||
QFrame(parent),
|
QFrame(parent),
|
||||||
_content(c)
|
_content(c)
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
|
|
||||||
QBoxLayout* l = new QBoxLayout(QBoxLayout::TopToBottom);
|
QBoxLayout* l = new QBoxLayout(QBoxLayout::TopToBottom);
|
||||||
l->setContentsMargins(0, 0, 0, 0);
|
l->setContentsMargins(0, 0, 0, 0);
|
||||||
l->setSpacing(0);
|
l->setSpacing(0);
|
||||||
@ -20,7 +17,6 @@ SectionContentWidget::SectionContentWidget(SectionContent::RefPtr c, QWidget* pa
|
|||||||
|
|
||||||
SectionContentWidget::~SectionContentWidget()
|
SectionContentWidget::~SectionContentWidget()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
layout()->removeWidget(_content->contentWidget());
|
layout()->removeWidget(_content->contentWidget());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "ads/SectionTitleWidget.h"
|
#include "ads/SectionTitleWidget.h"
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
@ -31,8 +30,6 @@ SectionTitleWidget::SectionTitleWidget(SectionContent::RefPtr content, QWidget*
|
|||||||
_tabMoving(false),
|
_tabMoving(false),
|
||||||
_activeTab(false)
|
_activeTab(false)
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
|
|
||||||
QBoxLayout* l = new QBoxLayout(QBoxLayout::LeftToRight);
|
QBoxLayout* l = new QBoxLayout(QBoxLayout::LeftToRight);
|
||||||
l->setContentsMargins(0, 0, 0, 0);
|
l->setContentsMargins(0, 0, 0, 0);
|
||||||
l->setSpacing(0);
|
l->setSpacing(0);
|
||||||
@ -42,7 +39,6 @@ SectionTitleWidget::SectionTitleWidget(SectionContent::RefPtr content, QWidget*
|
|||||||
|
|
||||||
SectionTitleWidget::~SectionTitleWidget()
|
SectionTitleWidget::~SectionTitleWidget()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
layout()->removeWidget(_content->titleWidget());
|
layout()->removeWidget(_content->titleWidget());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +63,6 @@ void SectionTitleWidget::setActiveTab(bool active)
|
|||||||
|
|
||||||
void SectionTitleWidget::mousePressEvent(QMouseEvent* ev)
|
void SectionTitleWidget::mousePressEvent(QMouseEvent* ev)
|
||||||
{
|
{
|
||||||
// qDebug() << Q_FUNC_INFO << ev->pos();
|
|
||||||
if (ev->button() == Qt::LeftButton)
|
if (ev->button() == Qt::LeftButton)
|
||||||
{
|
{
|
||||||
_dragStartPos = ev->pos();
|
_dragStartPos = ev->pos();
|
||||||
@ -79,7 +74,6 @@ void SectionTitleWidget::mousePressEvent(QMouseEvent* ev)
|
|||||||
|
|
||||||
void SectionTitleWidget::mouseReleaseEvent(QMouseEvent* ev)
|
void SectionTitleWidget::mouseReleaseEvent(QMouseEvent* ev)
|
||||||
{
|
{
|
||||||
// qDebug() << Q_FUNC_INFO << ev->pos();
|
|
||||||
SectionWidget* section = NULL;
|
SectionWidget* section = NULL;
|
||||||
|
|
||||||
// Drop contents of FloatingWidget into SectionWidget.
|
// Drop contents of FloatingWidget into SectionWidget.
|
||||||
@ -161,14 +155,11 @@ void SectionTitleWidget::mouseReleaseEvent(QMouseEvent* ev)
|
|||||||
else if (_tabMoving
|
else if (_tabMoving
|
||||||
&& (section = findParentSectionWidget(this)) != NULL)
|
&& (section = findParentSectionWidget(this)) != NULL)
|
||||||
{
|
{
|
||||||
qDebug() << "Stop tab move";
|
|
||||||
|
|
||||||
// Find tab under mouse
|
// Find tab under mouse
|
||||||
QPoint pos = ev->globalPos();
|
QPoint pos = ev->globalPos();
|
||||||
pos = section->mapFromGlobal(pos);
|
pos = section->mapFromGlobal(pos);
|
||||||
const int fromIndex = section->indexOfContent(_content);
|
const int fromIndex = section->indexOfContent(_content);
|
||||||
const int toIndex = section->indexOfContentByTitlePos(pos, this);
|
const int toIndex = section->indexOfContentByTitlePos(pos, this);
|
||||||
qDebug() << "from" << fromIndex << "to" << toIndex;
|
|
||||||
section->moveContent(fromIndex, toIndex);
|
section->moveContent(fromIndex, toIndex);
|
||||||
section->layout()->update();
|
section->layout()->update();
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,6 @@ SectionWidget::SectionWidget(ContainerWidget* parent) :
|
|||||||
|
|
||||||
SectionWidget::~SectionWidget()
|
SectionWidget::~SectionWidget()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
if (_container)
|
if (_container)
|
||||||
{
|
{
|
||||||
SWLookupMapById(_container).remove(_uid);
|
SWLookupMapById(_container).remove(_uid);
|
||||||
@ -90,7 +89,6 @@ SectionWidget::~SectionWidget()
|
|||||||
if (splitter && splitter->count() == 0)
|
if (splitter && splitter->count() == 0)
|
||||||
{
|
{
|
||||||
splitter->deleteLater();
|
splitter->deleteLater();
|
||||||
qDebug() << "Delete empty splitter";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,7 +277,6 @@ void SectionWidget::setCurrentIndex(int index)
|
|||||||
qWarning() << Q_FUNC_INFO << "Invalid index" << index;
|
qWarning() << Q_FUNC_INFO << "Invalid index" << index;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qDebug() << Q_FUNC_INFO << index << QString("section=%1; content=%2").arg(_uid).arg(_contents.at(index)->uniqueName());
|
|
||||||
|
|
||||||
// Set active TAB
|
// Set active TAB
|
||||||
for (int i = 0; i < _tabsLayout->count(); ++i)
|
for (int i = 0; i < _tabsLayout->count(); ++i)
|
||||||
@ -314,7 +311,6 @@ void SectionWidget::onSectionTitleClicked()
|
|||||||
|
|
||||||
void SectionWidget::onCloseButtonClicked()
|
void SectionWidget::onCloseButtonClicked()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << currentIndex();
|
|
||||||
const int index = currentIndex();
|
const int index = currentIndex();
|
||||||
if (index < 0 || index > _contents.size() - 1)
|
if (index < 0 || index > _contents.size() - 1)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user