fix some warnings
This commit is contained in:
@@ -16,7 +16,7 @@ BlockEditor::BlockEditor(QWidget *parent) : QWidget(parent), ui(new Ui::BlockEdi
|
||||
ui->setupUi(this);
|
||||
src_title = windowTitle();
|
||||
connect(ui->blockView->scene(), SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
|
||||
block.setFlags(0);
|
||||
block.setFlags(QGraphicsItem::GraphicsItemFlags());
|
||||
ui->blockView->addItem(&block);
|
||||
ui->blockView->viewport()->installEventFilter(this);
|
||||
DrawTools * drawtools = new DrawTools(ui->blockView);
|
||||
|
||||
@@ -12,7 +12,7 @@ g_main(this), g_selection(this) {
|
||||
setFlags(QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsMovable);
|
||||
g_main.setData(1002, true);
|
||||
g_selection.setData(1007, true);
|
||||
g_selection.setAcceptedMouseButtons(0);
|
||||
g_selection.setAcceptedMouseButtons(Qt::MouseButtons());
|
||||
g_selection.setZValue(10.);
|
||||
g_selection.hide();
|
||||
g_selection.setData(1003, true);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef BLOCKITEM_H
|
||||
#define BLOCKITEM_H
|
||||
|
||||
#include <QTime>
|
||||
#include <QElapsedTimer>
|
||||
#include "blockitempin.h"
|
||||
#include "qad_blockview_export.h"
|
||||
|
||||
@@ -113,7 +113,7 @@ private:
|
||||
void setSelectionRect(const QRectF & r);
|
||||
|
||||
QPropertyAnimation anim_thick, anim_sel;
|
||||
QTime t_sel;
|
||||
QElapsedTimer t_sel;
|
||||
|
||||
signals:
|
||||
void blockHoverEnter(BlockItem * b);
|
||||
|
||||
@@ -524,7 +524,7 @@ void DrawTools::alignClicked() {
|
||||
if (b != sb)
|
||||
b->setChecked(false);
|
||||
sb->setChecked(true);
|
||||
align = 0;
|
||||
align = Qt::Alignment();
|
||||
QString als = sb->objectName().right(2).toLower();
|
||||
if (als[0] == 't') align |= Qt::AlignTop;
|
||||
if (als[0] == 'c') align |= Qt::AlignVCenter;
|
||||
|
||||
Reference in New Issue
Block a user