Commit 65dc0422 authored by shibakaneki's avatar shibakaneki

Merge branch 'master' of github.com:Sankore/Sankore-3.1

	src/customWidgets/customWidgets.pri
parent 72532068
......@@ -35,6 +35,7 @@ QT += script
QT += xmlpatterns
INCLUDEPATH += src
INCLUDEPATH += globals
include($$THIRD_PARTY_PATH/libs.pri)
include(src/adaptors/adaptors.pri)
......@@ -83,6 +84,7 @@ UB_LIBRARY.files = resources/library
UB_FONTS.files = resources/fonts
UB_THIRDPARTY_INTERACTIVE.files = thirdparty/interactive
DEFINES += NO_THIRD_PARTY_WARNINGS
DEFINES += UBVERSION=\"\\\"$${LONG_VERSION}\"\\\" \
UBVERSION_RC=$$VERSION_RC
ALPHA_BETA_STR = $$find(VERSION, "[ab]")
......
......@@ -22,8 +22,12 @@
#include "document/UBDocumentProxy.h"
#include "globals/UBGlobals.h"
THIRD_PARTY_WARNINGS_DISABLE
#include "quazip.h"
#include "quazipfile.h"
THIRD_PARTY_WARNINGS_ENABLE
#include "transition/UniboardSankoreTransition.h"
......
......@@ -23,8 +23,12 @@
#include "document/UBDocumentProxy.h"
#include "globals/UBGlobals.h"
THIRD_PARTY_WARNINGS_DISABLE
#include "quazip.h"
#include "quazipfile.h"
THIRD_PARTY_WARNINGS_ENABLE
#include "core/memcheck.h"
......
......@@ -27,9 +27,13 @@
#include "UBCFFSubsetAdaptor.h"
#include "UBImportCFF.h"
#include "globals/UBGlobals.h"
THIRD_PARTY_WARNINGS_DISABLE
#include "quazip.h"
#include "quazipfile.h"
#include "quazipfileinfo.h"
THIRD_PARTY_WARNINGS_ENABLE
#include "core/memcheck.h"
......
......@@ -22,9 +22,13 @@
#include "core/UBSettings.h"
#include "core/UBPersistenceManager.h"
#include "globals/UBGlobals.h"
THIRD_PARTY_WARNINGS_DISABLE
#include "quazip.h"
#include "quazipfile.h"
#include "quazipfileinfo.h"
THIRD_PARTY_WARNINGS_ENABLE
#include "core/memcheck.h"
......
......@@ -34,8 +34,12 @@
#include "domain/UBGraphicsWidgetItem.h"
#include "globals/UBGlobals.h"
THIRD_PARTY_WARNINGS_DISABLE
#include "quazip.h"
#include "quazipfile.h"
THIRD_PARTY_WARNINGS_ENABLE
#include "adaptors/UBExportFullPDF.h"
#include "adaptors/UBExportDocument.h"
......
......@@ -92,43 +92,8 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll
UBBoardPaletteManager::~UBBoardPaletteManager()
{
if(NULL != mpDownloadWidget)
{
delete mpDownloadWidget;
mpDownloadWidget = NULL;
}
if(NULL != mpTeacherBarWidget)
{
delete mpTeacherBarWidget;
mpTeacherBarWidget = NULL;
}
if(NULL != mpPageNavigWidget)
{
delete mpPageNavigWidget;
mpPageNavigWidget = NULL;
}
if(NULL != mpLibWidget)
{
delete mpLibWidget;
mpLibWidget = NULL;
}
if(NULL != mpCachePropWidget)
{
delete mpCachePropWidget;
mpCachePropWidget = NULL;
}
delete mAddItemPalette;
if(NULL != mLeftPalette)
{
delete mLeftPalette;
mLeftPalette = NULL;
}
if(NULL != mRightPalette)
{
delete mRightPalette;
mRightPalette = NULL;
}
if(NULL != mStylusPalette)
{
......
#ifndef UBGLOBALS_H
#define UBGLOBALS_H
#define DELETEPTR(ptr) if(NULL != ptr){ \
delete ptr; \
ptr = NULL; \
}
#endif // UBGLOBALS_H
......@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "core/UBApplication.h"
#include "UBGlobals.h"
#include "globals/UBGlobals.h"
#include "UBMediaWidget.h"
/**
......
......@@ -3,7 +3,7 @@
#include <QApplication>
#include <QPainter>
#include "UBGlobals.h"
#include "globals/UBGlobals.h"
#include "UBWidgetList.h"
UBWidgetList::UBWidgetList(QWidget* parent, eWidgetListOrientation orientation, const char* name):QScrollArea(parent)
......
......@@ -2,7 +2,7 @@
HEADERS += src/customWidgets/UBWidgetList.h \
src/customWidgets/UBDraggableLabel.h \
src/customWidgets/UBMediaWidget.h \
src/customWidgets/UBGlobals.h \
src/globals/UBGlobals.h \
src/customWidgets/UBDraggableMedia.h \
src/customWidgets/UBActionableWidget.h
......
#ifndef UBGLOBALS_H
#define UBGLOBALS_H
#define DELETEPTR(ptr) if(NULL != ptr){ \
delete ptr; \
ptr = NULL; \
}
#ifdef Q_WS_WIN
#define WARNINGS_DISABLE __pragma(warning(push, 0));
#define WARNINGS_ENABLE __pragma(warning(pop));
#ifdef NO_THIRD_PARTY_WARNINGS
// disabling warning level to 0 and save old state
#define THIRD_PARTY_WARNINGS_DISABLE WARNINGS_DISABLE
#else
// just save old state (needs for not empty define)
#define THIRD_PARTY_WARNINGS_DISABLE __pragma(warning(push));
#endif //#ifdef NO_THIRD_PARTY_WARNINGS
// anyway on WIN
#define THIRD_PARTY_WARNINGS_ENABLE WARNINGS_ENABLE
#else //#ifdef Q_WS_WIN
#define WARNINGS_DISABLE _Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\""); \
_Pragma("GCC diagnostic ignored \"-Wunused-variable\""); \
_Pragma("GCC diagnostic ignored \"-Wsign-compare\"");
#define WARNINGS_ENABLE _Pragma("GCC diagnostic pop");
#ifdef NO_THIRD_PARTY_WARNINGS
//disabling some warnings
#define THIRD_PARTY_WARNINGS_DISABLE WARNINGS_DISABLE
#else
// just save old state (needs for not empty define)
#define THIRD_PARTY_WARNINGS_ENABLE WARNINGS_ENABLE
#endif //#ifdef NO_THIRD_PARTY_WARNINGS
#endif //#ifdef Q_WS_WIN
#endif // UBGLOBALS_H
\ No newline at end of file
#include <QDebug>
#include "UBTBDocumentEditWidget.h"
#include "customWidgets/UBGlobals.h"
#include "globals/UBGlobals.h"
UBTBDocumentEditWidget::UBTBDocumentEditWidget(UBTeacherBarDataMgr* pDataMgr, QWidget *parent, const char *name):QWidget(parent)
, mpPageViewButton(NULL)
......
#include "customWidgets/UBGlobals.h"
#include "globals/UBGlobals.h"
#include "UBTBDocumentPreviewWidget.h"
UBTBDocumentPreviewWidget::UBTBDocumentPreviewWidget(UBTeacherBarDataMgr *pDataMgr, QWidget *parent, const char *name):QWidget(parent)
......
#include "customWidgets/UBGlobals.h"
#include "globals/UBGlobals.h"
#include "core/UBApplication.h"
#include "frameworks/UBFileSystemUtils.h"
#include "gui/UBMediaPlayer.h"
......
......@@ -7,7 +7,7 @@
#include "board/UBBoardController.h"
#include "customWidgets/UBGlobals.h"
#include "globals/UBGlobals.h"
#include "adaptors/UBMetadataDcSubsetAdaptor.h"
......
#include "core/UBApplication.h"
#include "customWidgets/UBGlobals.h"
#include "globals/UBGlobals.h"
#include "board/UBBoardController.h"
#include "frameworks/UBFileSystemUtils.h"
......
......@@ -15,7 +15,7 @@
#include "customWidgets/UBDraggableLabel.h"
#include "customWidgets/UBMediaWidget.h"
#include "customWidgets/UBGlobals.h"
#include "globals/UBGlobals.h"
#include "core/memcheck.h"
......
......@@ -18,10 +18,15 @@
#include <QImage>
#include "PDFRenderer.h"
#include <splash/SplashBitmap.h>
#include "globals/UBGlobals.h"
THIRD_PARTY_WARNINGS_DISABLE
#include <xpdf/Object.h>
#include <xpdf/GlobalParams.h>
#include <xpdf/SplashOutputDev.h>
#include <xpdf/PDFDoc.h>
THIRD_PARTY_WARNINGS_ENABLE
class PDFDoc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment