fix whitespaces

pull/1/head
Michail Vourlakos 8 years ago
parent d2b5487abd
commit 17d2626443

@ -156,14 +156,14 @@ void DockView::init()
void DockView::setCurrentScreen(const QString id) void DockView::setCurrentScreen(const QString id)
{ {
if (!m_screenToFollow || m_screenToFollow->name() == id){ if (!m_screenToFollow || m_screenToFollow->name() == id) {
return; return;
} }
QScreen *nextScreen{nullptr}; QScreen *nextScreen{nullptr};
foreach(auto scr, qGuiApp->screens()){ foreach (auto scr, qGuiApp->screens()) {
if (scr && scr->name() == id){ if (scr && scr->name() == id) {
nextScreen = scr; nextScreen = scr;
break; break;
} }
@ -195,17 +195,18 @@ void DockView::setScreenToFollow(QScreen *screen)
void DockView::reconsiderScreen() void DockView::reconsiderScreen()
{ {
qDebug() << " Delayer "; qDebug() << " Delayer ";
foreach(auto scr, qGuiApp->screens()){
qDebug() << " D, found screen: "<<scr->name(); foreach (auto scr, qGuiApp->screens()) {
qDebug() << " D, found screen: " << scr->name();
} }
if (m_onPrimary && screen()!=qGuiApp->primaryScreen()) { if (m_onPrimary && screen() != qGuiApp->primaryScreen()) {
connect(qGuiApp->primaryScreen(), &QScreen::geometryChanged, this, &DockView::screenGeometryChanged); connect(qGuiApp->primaryScreen(), &QScreen::geometryChanged, this, &DockView::screenGeometryChanged);
setScreenToFollow(qGuiApp->primaryScreen()); setScreenToFollow(qGuiApp->primaryScreen());
syncGeometry(); syncGeometry();
} else { } else {
foreach(auto scr, qGuiApp->screens()){ foreach (auto scr, qGuiApp->screens()) {
if (scr && scr->name() == m_screenToFollowId){ if (scr && scr->name() == m_screenToFollowId) {
connect(scr, &QScreen::geometryChanged, this, &DockView::screenGeometryChanged); connect(scr, &QScreen::geometryChanged, this, &DockView::screenGeometryChanged);
setScreenToFollow(scr); setScreenToFollow(scr);
syncGeometry(); syncGeometry();
@ -386,7 +387,7 @@ void DockView::updatePosition()
case Plasma::Types::BottomEdge: case Plasma::Types::BottomEdge:
screenGeometry = this->screen()->geometry(); screenGeometry = this->screen()->geometry();
qDebug() << "screen geometry: "<<screenGeometry; qDebug() << "screen geometry: " << screenGeometry;
if (m_drawShadows) { if (m_drawShadows) {
position = {screenGeometry.x() + length(screenGeometry.width()), position = {screenGeometry.x() + length(screenGeometry.width()),
@ -439,6 +440,7 @@ inline void DockView::syncGeometry()
// setScreen(qGuiApp->primaryScreen()); // setScreen(qGuiApp->primaryScreen());
//} //}
bool found{false}; bool found{false};
if (this->screen() != m_screenToFollow) { if (this->screen() != m_screenToFollow) {
qDebug() << "Sync Geometry screens incosistent!!!!"; qDebug() << "Sync Geometry screens incosistent!!!!";
/*foreach(auto scr, qGuiApp->screens()){ /*foreach(auto scr, qGuiApp->screens()){
@ -463,6 +465,7 @@ inline void DockView::syncGeometry()
resizeWindow(); resizeWindow();
updatePosition(); updatePosition();
} }
// qDebug() << "dock geometry:" << qRectToStr(geometry()); // qDebug() << "dock geometry:" << qRectToStr(geometry());
} }
@ -565,7 +568,7 @@ bool DockView::onPrimary() const
void DockView::setOnPrimary(bool flag) void DockView::setOnPrimary(bool flag)
{ {
if (m_onPrimary == flag){ if (m_onPrimary == flag) {
return; return;
} }
@ -697,6 +700,7 @@ bool DockView::event(QEvent *e)
engine()->clearComponentCache(); engine()->clearComponentCache();
engine()->trimComponentCache(); engine()->trimComponentCache();
} }
return ContainmentView::event(e); return ContainmentView::event(e);
} }

Loading…
Cancel
Save