removed some warning

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent ff6fbd525f
commit f0bf15a3b1
  1. 5
      src/adaptors/UBCFFSubsetAdaptor.cpp
  2. 2
      src/adaptors/UBMetadataDcSubsetAdaptor.cpp
  3. 3
      src/adaptors/publishing/UBDocumentPublisher.cpp
  4. 2
      src/board/UBBoardPaletteManager.cpp
  5. 16
      src/core/UBSettings.cpp
  6. 13
      src/domain/UBGraphicsScene.cpp
  7. 7
      src/gui/UBDocumentNavigator.cpp
  8. 2
      src/gui/UBLibraryWidget.cpp
  9. 1
      src/gui/UBMagnifer.cpp
  10. 1
      src/gui/UBToolWidget.cpp

@ -729,10 +729,8 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgFlash(const QDomElement &ele
QTransform transform; QTransform transform;
QString textTransform = element.attribute(aTransform); QString textTransform = element.attribute(aTransform);
bool hastransform = false;
if (!textTransform.isNull()) { if (!textTransform.isNull()) {
transform = transformFromString(textTransform); transform = transformFromString(textTransform);
hastransform = true;
} }
repositionSvgItem(flashItem, width, height, x, y, true, transform); repositionSvgItem(flashItem, width, height, x, y, true, transform);
hashSceneItem(element, flashItem); hashSceneItem(element, flashItem);
@ -923,13 +921,12 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseIwbElement(QDomElement &element
} }
bool locked = false; bool locked = false;
bool isBackground = false;
bool isEditableItem = false; bool isEditableItem = false;
bool isEditable = false; //Text items to convert to UBGraphicsTextItem only bool isEditable = false; //Text items to convert to UBGraphicsTextItem only
QString IDRef = element.attribute(aRef); QString IDRef = element.attribute(aRef);
if (!IDRef.isNull()) { if (!IDRef.isNull()) {
isBackground = element.hasAttribute(aBackground) ? strToBool(element.attribute(aBackground)) : false; element.hasAttribute(aBackground) ? strToBool(element.attribute(aBackground)) : false;
locked = element.hasAttribute(aBackground) ? strToBool(element.attribute(aBackground)) : false; locked = element.hasAttribute(aBackground) ? strToBool(element.attribute(aBackground)) : false;
isEditableItem = element.hasAttribute(aEditable); isEditableItem = element.hasAttribute(aEditable);
if (isEditableItem) if (isEditableItem)

@ -90,8 +90,6 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy)
xmlWriter.writeStartElement("Description"); xmlWriter.writeStartElement("Description");
xmlWriter.writeAttribute("about", proxy->metaData(UBSettings::documentIdentifer).toString()); xmlWriter.writeAttribute("about", proxy->metaData(UBSettings::documentIdentifer).toString());
QDate today = QDate::currentDate();
xmlWriter.writeTextElement(nsDc, "title", proxy->metaData(UBSettings::documentName).toString()); xmlWriter.writeTextElement(nsDc, "title", proxy->metaData(UBSettings::documentName).toString());
xmlWriter.writeTextElement(nsDc, "type", proxy->metaData(UBSettings::documentGroupName).toString()); xmlWriter.writeTextElement(nsDc, "type", proxy->metaData(UBSettings::documentGroupName).toString());
xmlWriter.writeTextElement(nsDc, "date", QDate::currentDate().toString("yyyy-MM-dd")); xmlWriter.writeTextElement(nsDc, "date", QDate::currentDate().toString("yyyy-MM-dd"));

@ -240,8 +240,6 @@ void UBDocumentPublisher::upgradeDocumentForPublishing()
{ {
UBGraphicsScene *scene = UBSvgSubsetAdaptor::loadScene(mPublishingDocument, pageIndex); UBGraphicsScene *scene = UBSvgSubsetAdaptor::loadScene(mPublishingDocument, pageIndex);
bool sceneHasWidget = false;
QList<UBGraphicsW3CWidgetItem*> widgets; QList<UBGraphicsW3CWidgetItem*> widgets;
foreach(QGraphicsItem* item, scene->items()){ foreach(QGraphicsItem* item, scene->items()){
@ -249,7 +247,6 @@ void UBDocumentPublisher::upgradeDocumentForPublishing()
if(widgetItem){ if(widgetItem){
generateWidgetPropertyScript(widgetItem, pageIndex + 1); generateWidgetPropertyScript(widgetItem, pageIndex + 1);
sceneHasWidget = true;
widgets << widgetItem; widgets << widgetItem;
} }
} }

@ -81,8 +81,8 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll
, mpLibWidget(NULL) , mpLibWidget(NULL)
, mpCachePropWidget(NULL) , mpCachePropWidget(NULL)
, mpTeacherBarWidget(NULL) , mpTeacherBarWidget(NULL)
, mpDesktopLibWidget(NULL)
, mpDownloadWidget(NULL) , mpDownloadWidget(NULL)
, mpDesktopLibWidget(NULL)
, mDownloadInProgress(false) , mDownloadInProgress(false)
{ {
setupPalettes(); setupPalettes();

@ -854,8 +854,6 @@ QString UBSettings::uniboardUserVideoDirectory()
QString valideUserVideoDirectory = QString valideUserVideoDirectory =
UBDesktopServices::storageLocation(QDesktopServices::MoviesLocation); UBDesktopServices::storageLocation(QDesktopServices::MoviesLocation);
bool hasCreatedDir = false;
// first look into the application settings // first look into the application settings
if (sAppSettings && getAppSettings()->contains("App/UserVideoDirectory")) if (sAppSettings && getAppSettings()->contains("App/UserVideoDirectory"))
{ {
@ -889,7 +887,6 @@ QString UBSettings::uniboardUserVideoDirectory()
if (!dir.exists()) if (!dir.exists())
{ {
dir.mkpath(userVideoDirectory); dir.mkpath(userVideoDirectory);
hasCreatedDir = true;
} }
if (dir.exists()) if (dir.exists())
@ -898,7 +895,6 @@ QString UBSettings::uniboardUserVideoDirectory()
} }
else else
{ {
hasCreatedDir = false;
qWarning() << "Failed to interpret App/UserVideoDirectory config : " qWarning() << "Failed to interpret App/UserVideoDirectory config : "
+ getAppSettings()->value("App/UserVideoDirectory").toString() + getAppSettings()->value("App/UserVideoDirectory").toString()
+ ", defaulting to " + valideUserVideoDirectory; + ", defaulting to " + valideUserVideoDirectory;
@ -929,8 +925,6 @@ QString UBSettings::podcastRecordingDirectory()
QString validePodcastRecordingDirectory = QString validePodcastRecordingDirectory =
UBDesktopServices::storageLocation(QDesktopServices::DesktopLocation); UBDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
bool hasCreatedDir = false;
// first look into the application settings // first look into the application settings
if (sAppSettings && getAppSettings()->contains("Podcast/RecordingDirectory")) if (sAppSettings && getAppSettings()->contains("Podcast/RecordingDirectory"))
{ {
@ -964,7 +958,6 @@ QString UBSettings::podcastRecordingDirectory()
if (!dir.exists()) if (!dir.exists())
{ {
dir.mkpath(userPodcastRecordingDirectory); dir.mkpath(userPodcastRecordingDirectory);
hasCreatedDir = true;
} }
if (dir.exists()) if (dir.exists())
@ -973,7 +966,6 @@ QString UBSettings::podcastRecordingDirectory()
} }
else else
{ {
hasCreatedDir = false;
qWarning() << "Failed to interpret Podcast/RecordingDirectory config : " qWarning() << "Failed to interpret Podcast/RecordingDirectory config : "
+ getAppSettings()->value("Podcast/RecordingDirectory").toString() + getAppSettings()->value("Podcast/RecordingDirectory").toString()
+ ", defaulting to user Desktop"; + ", defaulting to user Desktop";
@ -1099,8 +1091,6 @@ QString UBSettings::uniboardInteractiveUserDirectory()
{ {
QString valideUserInteractiveDirectory = uniboardDataDirectory() + "/interactive content"; QString valideUserInteractiveDirectory = uniboardDataDirectory() + "/interactive content";
bool hasCreatedDir = false;
// first look into the application settings // first look into the application settings
if (sAppSettings && getAppSettings()->contains("App/UserInteractiveContentDirectory")) if (sAppSettings && getAppSettings()->contains("App/UserInteractiveContentDirectory"))
{ {
@ -1129,7 +1119,6 @@ QString UBSettings::uniboardInteractiveUserDirectory()
if (!dir.exists()) if (!dir.exists())
{ {
dir.mkpath(userWidgetDirectory); dir.mkpath(userWidgetDirectory);
hasCreatedDir = true;
} }
if (dir.exists()) if (dir.exists())
@ -1138,7 +1127,6 @@ QString UBSettings::uniboardInteractiveUserDirectory()
} }
else else
{ {
hasCreatedDir = false;
qWarning() << "Failed to interpret App/UserInteractiveContentDirectory config : " qWarning() << "Failed to interpret App/UserInteractiveContentDirectory config : "
+ getAppSettings()->value("App/UserInteractiveContentDirectory").toString() + getAppSettings()->value("App/UserInteractiveContentDirectory").toString()
+ ", defaulting to " + valideUserInteractiveDirectory; + ", defaulting to " + valideUserInteractiveDirectory;
@ -1194,8 +1182,6 @@ QString UBSettings::uniboardInteractiveFavoritesDirectory()
{ {
QString valideUserInteractiveDirectory = uniboardDataDirectory() + "/interactive favorites"; QString valideUserInteractiveDirectory = uniboardDataDirectory() + "/interactive favorites";
bool hasCreatedDir = false;
// first look into the application settings // first look into the application settings
if (sAppSettings && getAppSettings()->contains("App/UserInteractiveFavoritesDirectory")) if (sAppSettings && getAppSettings()->contains("App/UserInteractiveFavoritesDirectory"))
{ {
@ -1224,7 +1210,6 @@ QString UBSettings::uniboardInteractiveFavoritesDirectory()
if (!dir.exists()) if (!dir.exists())
{ {
dir.mkpath(userWidgetDirectory); dir.mkpath(userWidgetDirectory);
hasCreatedDir = true;
} }
if (dir.exists()) if (dir.exists())
@ -1233,7 +1218,6 @@ QString UBSettings::uniboardInteractiveFavoritesDirectory()
} }
else else
{ {
hasCreatedDir = false;
qWarning() << "Failed to interpret App/UserInteractiveFavoritesDirectory config : " qWarning() << "Failed to interpret App/UserInteractiveFavoritesDirectory config : "
+ getAppSettings()->value("App/UserInteractiveFavoritesDirectory").toString() + getAppSettings()->value("App/UserInteractiveFavoritesDirectory").toString()
+ ", defaulting to " + valideUserInteractiveDirectory; + ", defaulting to " + valideUserInteractiveDirectory;

@ -1586,8 +1586,6 @@ void UBGraphicsScene::addMagnifier(UBMagnifierParams params)
QGraphicsView *cView = (QGraphicsView*)UBApplication::boardController->controlView(); QGraphicsView *cView = (QGraphicsView*)UBApplication::boardController->controlView();
QGraphicsView *dView = (QGraphicsView*)UBApplication::boardController->displayView(); QGraphicsView *dView = (QGraphicsView*)UBApplication::boardController->displayView();
QPoint ccZeroPoint = cContainer->mapToGlobal(QPoint(0,0));
QPoint cvZeroPoint = cView->mapToGlobal(QPoint(0,0));
QPoint dvZeroPoint = dView->mapToGlobal(QPoint(0,0)); QPoint dvZeroPoint = dView->mapToGlobal(QPoint(0,0));
int cvW = cView->width(); int cvW = cView->width();
@ -1635,8 +1633,6 @@ void UBGraphicsScene::moveMagnifier(QPoint newPos)
QGraphicsView *cView = (QGraphicsView*)UBApplication::boardController->controlView(); QGraphicsView *cView = (QGraphicsView*)UBApplication::boardController->controlView();
QGraphicsView *dView = (QGraphicsView*)UBApplication::boardController->displayView(); QGraphicsView *dView = (QGraphicsView*)UBApplication::boardController->displayView();
QPoint ccZeroPoint = cContainer->mapToGlobal(QPoint(0,0));
QPoint cvZeroPoint = cView->mapToGlobal(QPoint(0,0));
QPoint dvZeroPoint = dView->mapToGlobal(QPoint(0,0)); QPoint dvZeroPoint = dView->mapToGlobal(QPoint(0,0));
int cvW = cView->width(); int cvW = cView->width();
@ -1711,16 +1707,7 @@ void UBGraphicsScene::addCache()
{ {
UBGraphicsCache* cache = new UBGraphicsCache(); UBGraphicsCache* cache = new UBGraphicsCache();
mTools << cache; mTools << cache;
QGraphicsView* view;
if(UBApplication::applicationController->displayManager()->hasDisplay())
{
view = (QGraphicsView*)(UBApplication::boardController->displayView());
}
else
{
view = (QGraphicsView*)(UBApplication::boardController->controlView());
}
addItem(cache); addItem(cache);
cache->setVisible(true); cache->setVisible(true);
cache->setSelected(true); cache->setSelected(true);

@ -105,7 +105,6 @@ void UBDocumentNavigator::generateThumbnails()
// Get the thumbnails // Get the thumbnails
QList<QPixmap> thumbs = UBThumbnailAdaptor::load(mCrntDoc); QList<QPixmap> thumbs = UBThumbnailAdaptor::load(mCrntDoc);
QGraphicsPixmapItem* selection = NULL;
for(int i = 0; i < thumbs.count(); i++) for(int i = 0; i < thumbs.count(); i++)
{ {
@ -115,7 +114,6 @@ void UBDocumentNavigator::generateThumbnails()
// Get the selected item // Get the selected item
if(UBApplication::boardController->activeSceneIndex() == i) if(UBApplication::boardController->activeSceneIndex() == i)
{ {
selection = pixmapItem;
mCrntItem = dynamic_cast<UBSceneThumbnailNavigPixmap*>(pixmapItem); mCrntItem = dynamic_cast<UBSceneThumbnailNavigPixmap*>(pixmapItem);
mCrntItem->setSelected(true); mCrntItem->setSelected(true);
} }
@ -289,11 +287,6 @@ void UBDocumentNavigator::refreshScene()
mLabels.at(i)->setPos(pos); mLabels.at(i)->setPos(pos);
} }
} }
QScrollBar *vertScrollBar = verticalScrollBar();
int scrollBarThickness = 0;
if (vertScrollBar && vertScrollBar->isVisible())
scrollBarThickness = vertScrollBar->width();
} }
/** /**

@ -39,9 +39,9 @@
*/ */
UBLibraryWidget::UBLibraryWidget(QWidget *parent, const char *name):UBThumbnailWidget(parent) UBLibraryWidget::UBLibraryWidget(QWidget *parent, const char *name):UBThumbnailWidget(parent)
, chainedElements(NULL) , chainedElements(NULL)
, mLibraryController(NULL)
, mpCrntDir(NULL) , mpCrntDir(NULL)
, mpCrntElem(NULL) , mpCrntElem(NULL)
, mLibraryController(NULL)
, mpTmpElem(NULL) , mpTmpElem(NULL)
{ {
setObjectName(name); setObjectName(name);

@ -204,7 +204,6 @@ void UBMagnifier::mouseMoveEvent ( QMouseEvent * event )
{ {
if(mShouldMoveWidget && (event->buttons() & Qt::LeftButton)) if(mShouldMoveWidget && (event->buttons() & Qt::LeftButton))
{ {
QPoint offset = event->pos() - mMousePressPos;
move(pos() - mMousePressPos + event->pos()); move(pos() - mMousePressPos + event->pos());
event->accept(); event->accept();

@ -183,7 +183,6 @@ void UBToolWidget::mouseMoveEvent ( QMouseEvent * event )
{ {
if(mShouldMoveWidget && (event->buttons() & Qt::LeftButton)) if(mShouldMoveWidget && (event->buttons() & Qt::LeftButton))
{ {
QPoint offset = event->pos() - mMousePressPos;
move(pos() - mMousePressPos + event->pos()); move(pos() - mMousePressPos + event->pos());
event->accept(); event->accept();
} }

Loading…
Cancel
Save