r18438 by craig - Move to Qt5 only. Fix upgrade checker. Move to custom rubberband for selection (avoids OSX opacity issues, need extended to other areas). Turn off language change on menus due to Qt menu bug or changes for now
scribus-commit
scribus-commit at lists.scribus.net
Mon Sep 2 22:01:46 UTC 2013
Author: craig
Date: Mon Sep 2 22:01:46 2013
New Revision: 18438
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18438
Log:
Move to Qt5 only. Fix upgrade checker. Move to custom rubberband for selection (avoids OSX opacity issues, need extended to other areas). Turn off language change on menus due to Qt menu bug or changes for now
Modified:
trunk/Scribus/scribus/CMakeLists.txt
trunk/Scribus/scribus/canvasmode.cpp
trunk/Scribus/scribus/canvasmode_copyproperties.cpp
trunk/Scribus/scribus/canvasmode_drawbezier.cpp
trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
trunk/Scribus/scribus/canvasmode_edit.cpp
trunk/Scribus/scribus/canvasmode_editarc.cpp
trunk/Scribus/scribus/canvasmode_editgradient.cpp
trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
trunk/Scribus/scribus/canvasmode_editpolygon.cpp
trunk/Scribus/scribus/canvasmode_editspiral.cpp
trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
trunk/Scribus/scribus/canvasmode_eyedropper.cpp
trunk/Scribus/scribus/canvasmode_framelinks.cpp
trunk/Scribus/scribus/canvasmode_imageimport.cpp
trunk/Scribus/scribus/canvasmode_magnifier.cpp
trunk/Scribus/scribus/canvasmode_normal.cpp
trunk/Scribus/scribus/canvasmode_objimport.cpp
trunk/Scribus/scribus/canvasmode_panning.cpp
trunk/Scribus/scribus/canvasmode_rotate.cpp
trunk/Scribus/scribus/pluginmanager.cpp
trunk/Scribus/scribus/plugins/tools/CMakeLists.txt
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusview.cpp
trunk/Scribus/scribus/scribusview.h
trunk/Scribus/scribus/ui/about.cpp
trunk/Scribus/scribus/ui/about.h
trunk/Scribus/scribus/ui/modetoolbar.cpp
trunk/Scribus/scribus/ui/scmenu.cpp
trunk/Scribus/scribus/upgradechecker.cpp
trunk/Scribus/scribus/upgradechecker.h
Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Mon Sep 2 22:01:46 2013
@@ -65,12 +65,6 @@
ui/pageitempositionsetter.cpp
ui/pageitemrotationsetter.cpp
)
-
-
-IF(NOT USE_QT5)
- SET(SCRIBUS_QT4_SRC upgradechecker.cpp)
- SET(SCRIBUS_QT4_CLASS upgradechecker.h)
-ENDIF(NOT USE_QT5)
SET(SCRIBUS_UI_SRC
ui/aboutplugins.ui
@@ -264,10 +258,12 @@
scribusview.h
scribuswin.h
selection.h
+ selectionrubberband.h
styleitem.h
tocgenerator.h
undogui.h
undomanager.h
+ upgradechecker.h
urllauncher.h
ui/about.h
ui/aboutplugins.h
@@ -495,7 +491,6 @@
ui/vruler.h
ui/weldedit.h
# ${SCRIBUS_ITEMSETTERS_CLASS}
- ${SCRIBUS_QT4_CLASS}
${SCRIBUS_OSG_CLASS}
)
@@ -686,6 +681,7 @@
sctextstruct.cpp
scxmlstreamreader.cpp
selection.cpp
+ selectionrubberband.cpp
serializer.cpp
styleitem.cpp
tableborder.cpp
@@ -702,6 +698,7 @@
units.cpp
unzip.c
updatemanager.cpp
+ upgradechecker.cpp
urllauncher.cpp
util.cpp
util_color.cpp
@@ -947,7 +944,6 @@
ui/useprintermarginsdialog.cpp
ui/weldedit.cpp
# ${SCRIBUS_ITEMSETTERS_SRC}
- ${SCRIBUS_QT4_SRC}
${SCRIBUS_OSG_SRC}
${SCRIBUS_GMAGICK_SRC}
)
Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Mon Sep 2 22:01:46 2013
@@ -276,7 +276,6 @@
bb.setCosmetic(true);
psx->scale(m_canvas->scale(), m_canvas->scale());
psx->translate(-m_doc->minCanvasCoordinate.x(), -m_doc->minCanvasCoordinate.y());
-
psx->setClipping(true);
psx->setClipRegion(QRegion ( m_canvas->exposedRect() ) );
if (m_doc->m_Selection->isMultipleSelection())
Modified: trunk/Scribus/scribus/canvasmode_copyproperties.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_copyproperties.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_copyproperties.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_copyproperties.cpp Mon Sep 2 22:01:46 2013
@@ -31,6 +31,7 @@
#include "scribusdoc.h"
#include "scribusview.h"
#include "selection.h"
+#include "selectionrubberband.h"
#include "util.h"
#include "util_icon.h"
#include "util_math.h"
@@ -90,7 +91,7 @@
void CanvasMode_CopyProperties::deactivate(bool forGesture)
{
// qDebug() << "CanvasMode_CopyProperties::deactivate" << forGesture;
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
}
void CanvasMode_CopyProperties::mouseDoubleClickEvent(QMouseEvent *m)
@@ -111,8 +112,7 @@
{
QPoint startP = m_canvas->canvasToGlobal(QPointF(Mxp, Myp));
m_view->redrawMarker->setGeometry(QRect(startP, m->globalPos()).normalized());
- if (!m_view->redrawMarker->isVisible())
- m_view->redrawMarker->show();
+ m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
return;
}
Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp Mon Sep 2 22:01:46 2013
@@ -148,7 +148,7 @@
target = m_doc->Pages->at(currItem->OwnPage);
undoManager->action(target, is);
}
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
}
void BezierMode::mouseDoubleClickEvent(QMouseEvent *m)
@@ -226,8 +226,7 @@
SeRy = newY;
QPoint startP = m_canvas->canvasToGlobal(QPointF(Mxp, Myp));
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
- if (!m_view->redrawMarker->isVisible())
- m_view->redrawMarker->show();
+ m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
return;
}
Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp Mon Sep 2 22:01:46 2013
@@ -84,7 +84,7 @@
void CalligraphicMode::deactivate(bool flag)
{
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
}
void CalligraphicMode::mouseDoubleClickEvent(QMouseEvent *m)
@@ -173,8 +173,7 @@
SeRy = newY;
QPoint startP = m_canvas->canvasToGlobal(m_doc->appMode == modeDrawTable2 ? QPointF(Dxp, Dyp) : QPointF(Mxp, Myp));
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
- if (!m_view->redrawMarker->isVisible())
- m_view->redrawMarker->show();
+ m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
return;
}
Modified: trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawfreehand.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_drawfreehand.cpp Mon Sep 2 22:01:46 2013
@@ -82,7 +82,7 @@
void FreehandMode::deactivate(bool flag)
{
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
}
void FreehandMode::mouseDoubleClickEvent(QMouseEvent *m)
@@ -161,8 +161,7 @@
SeRy = newY;
QPoint startP = m_canvas->canvasToGlobal(m_doc->appMode == modeDrawTable2 ? QPointF(Dxp, Dyp) : QPointF(Mxp, Myp));
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
- if (!m_view->redrawMarker->isVisible())
- m_view->redrawMarker->show();
+ m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
return;
}
Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Mon Sep 2 22:01:46 2013
@@ -258,7 +258,7 @@
void CanvasMode_Edit::deactivate(bool forGesture)
{
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
if (!forGesture)
{
mRulerGuide = -1;
@@ -477,8 +477,7 @@
SeRy = newY;
QPoint startP = m_canvas->canvasToGlobal(QPointF(Mxp, Myp));
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
- if (!m_view->redrawMarker->isVisible())
- m_view->redrawMarker->show();
+ m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
return;
}
@@ -855,7 +854,7 @@
}
}
m_view->HaveSelRect = false;
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
m_view->updateContents();
}
if (GetItem(&currItem))
Modified: trunk/Scribus/scribus/canvasmode_editarc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_editarc.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editarc.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editarc.cpp Mon Sep 2 22:01:46 2013
@@ -281,7 +281,7 @@
disconnect(VectorDialog, SIGNAL(paletteShown(bool)), this, SLOT(endEditing(bool)));
VectorDialog->close();
delete VectorDialog;
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
m_arcPoint = noPointDefined;
disconnect(m_doc, SIGNAL(docChanged()), this, SLOT(updateFromItem()));
}
Modified: trunk/Scribus/scribus/canvasmode_editgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_editgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editgradient.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editgradient.cpp Mon Sep 2 22:01:46 2013
@@ -262,7 +262,7 @@
void CanvasMode_EditGradient::deactivate(bool forGesture)
{
// qDebug() << "CanvasMode_EditGradient::deactivate" << forGesture;
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
}
void CanvasMode_EditGradient::mouseDoubleClickEvent(QMouseEvent *m)
Modified: trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp Mon Sep 2 22:01:46 2013
@@ -378,7 +378,7 @@
void CanvasMode_EditMeshGradient::deactivate(bool forGesture)
{
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
selectedMeshPoints.clear();
m_gradientPoint = noPointDefined;
m_ScMW->propertiesPalette->updateColorSpecialGradient();
Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp Mon Sep 2 22:01:46 2013
@@ -310,7 +310,7 @@
void CanvasMode_EditMeshPatch::deactivate(bool forGesture)
{
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
m_patchPoint = noPointDefined;
m_gradientPoint = noControlPointDefined;
m_click_count = 0;
Modified: trunk/Scribus/scribus/canvasmode_editpolygon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_editpolygon.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editpolygon.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editpolygon.cpp Mon Sep 2 22:01:46 2013
@@ -223,7 +223,7 @@
disconnect(VectorDialog, SIGNAL(paletteShown(bool)), this, SLOT(endEditing(bool)));
VectorDialog->close();
delete VectorDialog;
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
m_polygonPoint = noPointDefined;
disconnect(m_doc, SIGNAL(docChanged()), this, SLOT(updateFromItem()));
}
Modified: trunk/Scribus/scribus/canvasmode_editspiral.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_editspiral.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.cpp Mon Sep 2 22:01:46 2013
@@ -254,7 +254,7 @@
disconnect(VectorDialog, SIGNAL(paletteShown(bool)), this, SLOT(endEditing(bool)));
VectorDialog->close();
delete VectorDialog;
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
m_arcPoint = noPointDefined;
disconnect(m_doc, SIGNAL(docChanged()), this, SLOT(updateFromItem()));
}
Modified: trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editweldpoint.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editweldpoint.cpp Mon Sep 2 22:01:46 2013
@@ -37,30 +37,31 @@
#include <QWidgetAction>
#include <QDebug>
-#include "ui/aligndistribute.h"
#include "canvas.h"
-#include "ui/contextmenu.h"
#include "fpoint.h"
#include "fpointarray.h"
#include "hyphenator.h"
#include "pageitem_textframe.h"
-#include "ui/pageselector.h"
#include "prefscontext.h"
#include "prefsfile.h"
#include "prefsmanager.h"
-#include "ui/propertiespalette.h"
#include "sccolorengine.h"
#include "sclimits.h"
#include "scribus.h"
+#include "scribusXml.h"
#include "scribusdoc.h"
#include "scribusview.h"
-#include "scribusXml.h"
#include "selection.h"
+#include "ui/aligndistribute.h"
+#include "ui/contextmenu.h"
+#include "ui/pageselector.h"
+#include "ui/propertiespalette.h"
#include "undomanager.h"
#include "units.h"
#include "util.h"
#include "util_icon.h"
#include "util_math.h"
+
CanvasMode_EditWeldPoint::CanvasMode_EditWeldPoint(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW)
{
@@ -152,7 +153,7 @@
void CanvasMode_EditWeldPoint::deactivate(bool forGesture)
{
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
selectedPoint = -1;
weldToList.clear();
disconnect(ModeDialog, SIGNAL(paletteShown(bool)), this, SLOT(endEditing(bool)));
Modified: trunk/Scribus/scribus/canvasmode_eyedropper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_eyedropper.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_eyedropper.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_eyedropper.cpp Mon Sep 2 22:01:46 2013
@@ -101,7 +101,7 @@
void CanvasMode_EyeDropper::deactivate(bool forGesture)
{
// qDebug() << "CanvasMode_EyeDropper::deactivate" << forGesture;
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
releaseMouse();
}
Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp Mon Sep 2 22:01:46 2013
@@ -104,7 +104,7 @@
void CanvasMode_FrameLinks::deactivate(bool forGesture)
{
// qDebug() << "CanvasMode_FrameLinks::deactivate" << forGesture;
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
}
void CanvasMode_FrameLinks::mouseDoubleClickEvent(QMouseEvent *m)
@@ -129,8 +129,7 @@
SeRy = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
QPoint startP = m_canvas->canvasToGlobal(m_doc->appMode == modeDrawTable2 ? QPointF(Dxp, Dyp) : QPointF(Mxp, Myp));
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
- if (!m_view->redrawMarker->isVisible())
- m_view->redrawMarker->show();
+ m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
return;
}
Modified: trunk/Scribus/scribus/canvasmode_imageimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_imageimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_imageimport.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_imageimport.cpp Mon Sep 2 22:01:46 2013
@@ -147,7 +147,7 @@
void CanvasMode_ImageImport::deactivate(bool forGesture)
{
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
}
void CanvasMode_ImageImport::mouseDoubleClickEvent(QMouseEvent *m)
Modified: trunk/Scribus/scribus/canvasmode_magnifier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_magnifier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_magnifier.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_magnifier.cpp Mon Sep 2 22:01:46 2013
@@ -97,7 +97,7 @@
void CanvasMode_Magnifier::deactivate(bool forGesture)
{
// qDebug() << "CanvasMode_Magnifier::deactivate" << forGesture;
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
}
void CanvasMode_Magnifier::mouseDoubleClickEvent(QMouseEvent *m)
@@ -126,8 +126,7 @@
SeRy = newY;
QPoint startP = m_canvas->canvasToGlobal(m_doc->appMode == modeDrawTable2 ? QPointF(Dxp, Dyp) : QPointF(Mxp, Myp));
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
- if (!m_view->redrawMarker->isVisible())
- m_view->redrawMarker->show();
+ m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
}
}
@@ -205,10 +204,10 @@
if (sc == m_canvas->scale())
{
m_view->HaveSelRect = false;
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
m_view->requestMode(submodePaintingDone);
}
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
}
else
{
Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Mon Sep 2 22:01:46 2013
@@ -144,7 +144,7 @@
void CanvasMode_Normal::deactivate(bool forGesture)
{
// qDebug() << "CanvasMode_Normal::deactivate" << forGesture;
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
}
void CanvasMode_Normal::mouseDoubleClickEvent(QMouseEvent *m)
@@ -826,8 +826,7 @@
m_mouseSavedPoint.setXY(newX, newY);
QPoint startP = m_canvas->canvasToGlobal(m_mousePressPoint);
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
- if (!m_view->redrawMarker->isVisible())
- m_view->redrawMarker->show();
+ m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
return;
}
@@ -960,7 +959,7 @@
{
m_mouseCurrentPoint = m_mousePressPoint = m_mouseSavedPoint = mousePointDoc;
m_view->redrawMarker->setGeometry(m->globalPos().x(), m->globalPos().y(), 1, 1);
- m_view->redrawMarker->show();
+ m_view->setRedrawMarkerShown(true);
}
else
{
@@ -1018,7 +1017,7 @@
m_canvas->m_viewMode.m_MouseButtonPressed = false;
m_canvas->resetRenderMode();
m->accept();
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
// m_view->stopDragTimer();
//m_canvas->update(); //ugly in a mouseReleaseEvent!!!!!!!
if ((!GetItem(&currItem)) && (m->button() == Qt::RightButton) && (!m_doc->DragP) && (!m_doc->drawAsPreview))
Modified: trunk/Scribus/scribus/canvasmode_objimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_objimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_objimport.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_objimport.cpp Mon Sep 2 22:01:46 2013
@@ -114,7 +114,7 @@
// qDebug() << "CanvasMode_ObjImport::deactivate" << forGesture;
setMimeData(NULL);
setTransactionSettings(NULL);
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
}
void CanvasMode_ObjImport::mouseDoubleClickEvent(QMouseEvent *m)
Modified: trunk/Scribus/scribus/canvasmode_panning.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_panning.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_panning.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_panning.cpp Mon Sep 2 22:01:46 2013
@@ -74,7 +74,7 @@
void CanvasMode_Panning::deactivate(bool forGesture)
{
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
}
void CanvasMode_Panning::mouseDoubleClickEvent(QMouseEvent *m)
Modified: trunk/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_rotate.cpp Mon Sep 2 22:01:46 2013
@@ -173,7 +173,7 @@
void CanvasMode_Rotate::deactivate(bool)
{
- m_view->redrawMarker->hide();
+ m_view->setRedrawMarkerShown(false);
m_inItemRotation = false;
}
@@ -446,8 +446,7 @@
{
QPoint startP = m_canvas->canvasToGlobal(m_canvasPressCoord);
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
- if (!m_view->redrawMarker->isVisible())
- m_view->redrawMarker->show();
+ m_view->setRedrawMarkerShown(true);
m_view->HaveSelRect = true;
}
}
Modified: trunk/Scribus/scribus/pluginmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/pluginmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/pluginmanager.cpp (original)
+++ trunk/Scribus/scribus/pluginmanager.cpp Mon Sep 2 22:01:46 2013
@@ -314,7 +314,9 @@
if ((!ai.subMenuName.isEmpty()) && (!ai.parentMenu.isEmpty()))
{
if (!mw->scrMenuMgr->menuExists(ai.menu))
+ {
mw->scrMenuMgr->createMenu(ai.menu, ai.subMenuName, ai.parentMenu);
+ }
}
mw->scrMenuMgr->addMenuItem(mw->scrActions[ai.name], ai.menu, true);
}
@@ -646,8 +648,9 @@
pluginAction = ScCore->primaryMainWindow()->scrActions[ai.name];
if (pluginAction != 0)
pluginAction->setText( ai.text );
- if ((!ai.menu.isEmpty()) && (!ai.subMenuName.isEmpty()))
- ScCore->primaryMainWindow()->scrMenuMgr->setText(ai.menu, ai.subMenuName);
+//FIXME QT5 port causes disappearing menus, qt 5.1+
+ //if ((!ai.menu.isEmpty()) && (!ai.subMenuName.isEmpty()))
+ // ScCore->primaryMainWindow()->scrMenuMgr->setText(ai.menu, ai.subMenuName);
}
}
}
Modified: trunk/Scribus/scribus/plugins/tools/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/plugins/tools/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/CMakeLists.txt Mon Sep 2 22:01:46 2013
@@ -10,9 +10,9 @@
ADD_SUBDIRECTORY(subdivide)
ADD_SUBDIRECTORY(flattenpath)
ADD_SUBDIRECTORY(smoothpath)
-if (HAVE_ASPELL)
- ADD_SUBDIRECTORY(spellcheck)
-endif (HAVE_ASPELL)
+#if (HAVE_ASPELL)
+# ADD_SUBDIRECTORY(spellcheck)
+#endif (HAVE_ASPELL)
if (HAVE_HUNSPELL)
ADD_SUBDIRECTORY(hunspellcheck)
endif (HAVE_HUNSPELL)
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Mon Sep 2 22:01:46 2013
@@ -361,9 +361,9 @@
// initKeyboardShortcuts();
initMenuBar();
initToolBars();
- ScCore->pluginManager->setupPluginActions(this);
+ ScCore->pluginManager->setupPluginActions(this);
ScCore->pluginManager->enableOnlyStartupPluginActions(this);
- ScCore->pluginManager->languageChange();
+ ScCore->pluginManager->languageChange();
if (primaryMainWindow)
ScCore->setSplashStatus( tr("Applying User Shortcuts") );
prefsManager->applyLoadedShortCuts();
@@ -1059,7 +1059,7 @@
//Help menu
scrMenuMgr->createMenu("Help", ActionManager::defaultMenuNameEntryTranslated("Help"));
scrMenuMgr->addMenuItem(scrActions["helpManual"], "Help", true);
- scrMenuMgr->addMenuItem(scrActions["helpManual2"], "Help", true);
+ //scrMenuMgr->addMenuItem(scrActions["helpManual2"], "Help", true);
scrMenuMgr->addMenuSeparator("Help");
scrMenuMgr->addMenuItem(scrActions["helpTooltips"], "Help", true);
scrMenuMgr->addMenuSeparator("Help");
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Mon Sep 2 22:01:46 2013
@@ -53,6 +53,7 @@
#include <QStringList>
#include <QWheelEvent>
#include <QWidgetAction>
+#include <QStyleOptionRubberBand>
#include <cstdio>
#include <cstdlib>
@@ -104,6 +105,7 @@
#include "scribuswin.h"
#include "scribusXml.h"
#include "selection.h"
+#include "selectionrubberband.h"
#include "serializer.h"
#include "text/nlsconfig.h"
#include "ui/adjustcmsdialog.h"
@@ -325,10 +327,7 @@
m_previousMode = -1;
redrawMode = 0;
redrawCount = 0;
- redrawMarker = new QRubberBand(QRubberBand::Rectangle, this);
-#ifdef USE_QT5
- redrawMarker->setWindowOpacity(0.5);
-#endif
+ redrawMarker = new SelectionRubberBand(QRubberBand::Rectangle, this);
redrawMarker->hide();
m_canvas->newRedrawPolygon();
m_canvas->resetRenderMode();
@@ -4583,3 +4582,9 @@
//FIXME:av inItemCreation = false;
MidButt = false;
}
+
+void ScribusView::setRedrawMarkerShown(bool shown)
+{
+ if (shown!=redrawMarker->isVisible())
+ redrawMarker->setVisible(shown);
+}
Modified: trunk/Scribus/scribus/scribusview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/scribusview.h
==============================================================================
--- trunk/Scribus/scribus/scribusview.h (original)
+++ trunk/Scribus/scribus/scribusview.h Mon Sep 2 22:01:46 2013
@@ -84,6 +84,7 @@
class UndoManager;
class UndoTransaction;
class TransactionSettings;
+#include "selectionrubberband.h"
/**
* This class provides an incomplete base for your application view.
@@ -174,7 +175,7 @@
int redrawMode;
int redrawCount;
PageItem *redrawItem;
- QRubberBand *redrawMarker;
+ SelectionRubberBand *redrawMarker;
FPoint RCenter;
void updatesOn(bool on);
//CB This MUST now be called AFTER a call to doc->addPage or doc->addMasterPage as it
@@ -231,6 +232,7 @@
void scrollCanvasBy(double deltaX, double deltaY);
FPoint canvasOrigin() const;
QRectF visibleCanvas() const;
+ void setRedrawMarkerShown(bool shown);
private:
// legacy:
Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp (original)
+++ trunk/Scribus/scribus/ui/about.cpp Mon Sep 2 22:01:46 2013
@@ -35,9 +35,7 @@
#include "util_ghostscript.h"
#include "util_icon.h"
-#ifndef USE_QT5
- #include "upgradechecker.h"
-#endif
+#include "upgradechecker.h"
#include "langmgr.h"
@@ -296,6 +294,8 @@
result = tr("OS/2®/eComStation™ Port:");
else if ( title == "Windows® Port:" )
result = tr("Windows® Port:");
+ else if ( title == "Haiku Port:" )
+ result = tr("Haiku Port:");
else if ( title == "Contributions from:" )
result = tr("Contributions from:");
else if ( title == "Official Documentation:" )
@@ -640,13 +640,11 @@
void About::runUpdateCheck()
{
textView5->clear();
-#ifndef USE_QT5
UpgradeCheckerGUI uc(textView5);
disconnect( checkForUpdateButton, SIGNAL( clicked() ), this, SLOT( runUpdateCheck() ) );
- connect(checkForUpdateButton, SIGNAL( clicked() ), &uc, SLOT( abort() ));
- checkForUpdateButton->setText( tr("Abort Update Check") );
+ //connect(checkForUpdateButton, SIGNAL( clicked() ), &uc, SLOT( abort() ));
+ //checkForUpdateButton->setText( tr("Abort Update Check") );
uc.fetch();
- checkForUpdateButton->setText( tr("Check for Updates") );
+ //checkForUpdateButton->setText( tr("Check for Updates") );
connect( checkForUpdateButton, SIGNAL( clicked() ), this, SLOT( runUpdateCheck() ) );
-#endif
}
Modified: trunk/Scribus/scribus/ui/about.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/ui/about.h
==============================================================================
--- trunk/Scribus/scribus/ui/about.h (original)
+++ trunk/Scribus/scribus/ui/about.h Mon Sep 2 22:01:46 2013
@@ -13,7 +13,7 @@
#include "scribusapi.h"
-class ScTextBrowser;
+#include "ui/sctextbrowser.h"
class QLabel;
class QWidget;
class QTabWidget;
Modified: trunk/Scribus/scribus/ui/modetoolbar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/ui/modetoolbar.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/modetoolbar.cpp (original)
+++ trunk/Scribus/scribus/ui/modetoolbar.cpp Mon Sep 2 22:01:46 2013
@@ -25,6 +25,7 @@
#include <QEvent>
#include <QMenu>
#include <QPixmap>
+#include <QToolButton>
#include "modetoolbar.h"
Modified: trunk/Scribus/scribus/ui/scmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/ui/scmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scmenu.cpp (original)
+++ trunk/Scribus/scribus/ui/scmenu.cpp Mon Sep 2 22:01:46 2013
@@ -138,7 +138,7 @@
{
if (newMenuAction)
{
-
+
#ifdef Q_OS_MAC
bool menuListHasNoIcons = true;
// look for ScrAction or ScrPopupMenu from the end of the list
@@ -166,7 +166,7 @@
if (newMenuAction->icon().isNull() && ! menuListHasNoIcons)
newMenuAction->setIcon(loadIcon("noicon.xpm"));
#endif
-
+
menuItemList.append(newMenuAction);
localPopupMenu->addAction(newMenuAction);
return true;
@@ -283,7 +283,7 @@
menuItemList.removeAll(*menuItemListItToDelete);
continue;
}
-
+
QString menuItemListClassName=listObj->metaObject()->className();
if (menuItemListClassName=="ScrAction")
{
Modified: trunk/Scribus/scribus/upgradechecker.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/upgradechecker.cpp
==============================================================================
--- trunk/Scribus/scribus/upgradechecker.cpp (original)
+++ trunk/Scribus/scribus/upgradechecker.cpp Mon Sep 2 22:01:46 2013
@@ -9,7 +9,7 @@
#include <QDebug>
#include <QDir>
#include <QDomDocument>
-#include <QHttp>
+#include <QNetworkRequest>
#include <QTextCodec>
#include <QTextStream>
#include <QWidget>
@@ -37,16 +37,12 @@
UpgradeChecker::~UpgradeChecker()
{
- if(getter)
- delete getter;
}
void UpgradeChecker::init()
{
errorReported=false;
- userAbort=false;
message="";
- getter=0;
updates.clear();
version=(VERSION);
stability="unstablesvn";
@@ -76,51 +72,68 @@
fin=false;
rcvdFile=new QFile(tempFile);
- getter=new QHttp();
- if (getter!=0 && rcvdFile!=0)
- {
- connect(getter, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), this, SLOT(responseHeaderReceived(const QHttpResponseHeader &)));
- connect(getter, SIGNAL(requestFinished(int, bool)), this, SLOT(requestFinished(int, bool)));
- connect(getter, SIGNAL(done(bool)), this, SLOT(done(bool)));
-
+ networkManager=new QNetworkAccessManager(this);
+ if (networkManager!=0 && rcvdFile!=0)
+ {
outputText( tr("No data on your computer will be sent to an external location"));
qApp->processEvents();
if(rcvdFile->open(QIODevice::ReadWrite))
{
QString hostname("services.scribus.net");
QString filepath("/"+filename);
+ QUrl fileURL(QString("http://%1%2").arg(hostname).arg(filepath));
outputText("<b>"+ tr("Attempting to get the Scribus version update file:")+"</b>");
- outputText(QString("<b>http://%1%2</b>").arg(hostname).arg(filepath));
- getter->setHost(hostname, QHttp::ConnectionModeHttp);
- getterID=getter->get(filepath, rcvdFile);
-
+ outputText(fileURL.toString());
+
+ QNetworkRequest networkRequest(fileURL);
+ networkReply = networkManager->get(networkRequest);
+ connect(networkReply, SIGNAL(finished()), SLOT(downloadFinished()));
+ connect(networkReply, SIGNAL(readyRead()), SLOT(downloadReadyRead()));
+
int waitCount=0;
while (!fin && waitCount<20)
{
- sleep(1);
- ++waitCount;
- if (writeToConsole)
- std::cout << ". " << std::flush;
- outputText( ".", true );
- qApp->processEvents();
+ sleep(1);
+ ++waitCount;
+ if (writeToConsole)
+ std::cout << ". " << std::flush;
+ outputText( ".", true );
+ qApp->processEvents();
}
if (writeToConsole)
- std::cout << std::endl;
+ std::cout << std::endl;
if (waitCount>=20)
{
- outputText("<b>"+ tr("Timed out when attempting to get update file.")+"</b>");
- getter->abort();
+ outputText("<b>"+ tr("Timed out when attempting to get update file.")+"</b>");
}
rcvdFile->close();
}
rcvdFile->remove();
}
- delete getter;
delete rcvdFile;
- getter=0;
rcvdFile=0;
- if (!userAbort)
- outputText( tr("Finished") );
+ outputText( tr("Finished") );
+ networkReply->deleteLater();
+ networkManager->deleteLater();
+}
+
+void UpgradeChecker::downloadFinished()
+{
+ if (networkReply->error())
+ outputText(QString("Failed: %1").arg(qPrintable(networkReply->errorString())));
+ else
+ {
+ rcvdFile->reset();
+ process();
+ fin=true;
+ show(networkReply->error()!=QNetworkReply::NoError);
+ }
+}
+
+
+void UpgradeChecker::downloadReadyRead()
+{
+ rcvdFile->write(networkReply->readAll());
}
bool UpgradeChecker::process()
@@ -213,11 +226,6 @@
void UpgradeChecker::show(bool error)
{
outputText("<br/>");
- if (userAbort)
- {
- outputText("<b>"+ tr("Operation canceled")+"</b>");
- return;
- }
if (error)
{
outputText("<b>"+ tr("An error occurred while looking for updates for Scribus, please check your internet connection.")+"</b>");
@@ -248,10 +256,19 @@
qDebug() << outText.toLocal8Bit().data();
}
-UpgradeCheckerGUI::UpgradeCheckerGUI(ScTextBrowser *tb) :
- UpgradeChecker(),
- outputWidget(tb)
-{
+
+void UpgradeChecker::reportError(const QString& s)
+{
+ if (!errorReported)
+ {
+ outputText("<br/><b>"+ tr("Error: %1").arg(s)+"</b>");
+ errorReported=true;
+ }
+}
+
+UpgradeCheckerGUI::UpgradeCheckerGUI(ScTextBrowser *tb) : UpgradeChecker()
+{
+ outputWidget=tb;
writeToConsole=false;
}
@@ -276,49 +293,3 @@
}
-void UpgradeChecker::responseHeaderReceived(const QHttpResponseHeader &responseHeader)
-{
- if (responseHeader.statusCode() != 200)
- {
- reportError(responseHeader.reasonPhrase());
- getter->abort();
- }
-}
-
-void UpgradeChecker::requestFinished(int id, bool error)
-{
- if (error)
- reportError(getter->errorString());
-}
-
-void UpgradeChecker::done(bool error)
-{
- if (error)
- reportError(getter->errorString());
- else
- {
- if (rcvdFile)
- {
- rcvdFile->reset();
- process();
- }
- }
- fin=true;
- show(error);
-}
-
-void UpgradeChecker::reportError(const QString& s)
-{
- if (!errorReported)
- {
- outputText("<br/><b>"+ tr("Error: %1").arg(s)+"</b>");
- errorReported=true;
- }
-}
-
-void UpgradeChecker::abort()
-{
- userAbort=true;
- if (getter)
- getter->abort();
-}
Modified: trunk/Scribus/scribus/upgradechecker.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18438&path=/trunk/Scribus/scribus/upgradechecker.h
==============================================================================
--- trunk/Scribus/scribus/upgradechecker.h (original)
+++ trunk/Scribus/scribus/upgradechecker.h Mon Sep 2 22:01:46 2013
@@ -8,12 +8,11 @@
#define UPGRADECHECKER_H
#include <QFile>
+#include <QNetworkReply>
#include <QObject>
#include <QString>
#include <QStringList>
-class QHttp;
-class QHttpResponseHeader;
-
+#include <QNetworkAccessManager>
class ScTextBrowser;
/**
@@ -36,9 +35,8 @@
void abort();
private slots:
- void requestFinished(int requestId, bool error);
- void responseHeaderReceived(const QHttpResponseHeader &responseHeader);
- void done(bool);
+ void downloadFinished();
+ void downloadReadyRead();
protected:
void init();
@@ -53,14 +51,11 @@
QStringList updates;
QString tempFile;
bool fin;
- QHttp* getter;
- int getterID;
+ QNetworkAccessManager* networkManager;
+ QNetworkReply *networkReply;
QString message;
- int httpGetId;
- bool httpRequestAborted;
QFile *rcvdFile;
bool errorReported;
- bool userAbort;
};
class UpgradeCheckerGUI : public UpgradeChecker
More information about the scribus-commit
mailing list