code: removed unnecessary code
This commit is contained in:
@@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
#include "config/config.h"
|
#include "config/config.h"
|
||||||
#include "common/cpuoptimize.h"
|
#include "common/cpuoptimize.h"
|
||||||
#include "common/functiontimer.h"
|
|
||||||
|
|
||||||
namespace olive {
|
namespace olive {
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ extern "C" {
|
|||||||
#include "common/define.h"
|
#include "common/define.h"
|
||||||
#include "common/ffmpegutils.h"
|
#include "common/ffmpegutils.h"
|
||||||
#include "common/filefunctions.h"
|
#include "common/filefunctions.h"
|
||||||
#include "common/functiontimer.h"
|
|
||||||
#include "common/timecodefunctions.h"
|
#include "common/timecodefunctions.h"
|
||||||
#include "render/framehashcache.h"
|
#include "render/framehashcache.h"
|
||||||
#include "render/diskmanager.h"
|
#include "render/diskmanager.h"
|
||||||
|
|||||||
@@ -34,9 +34,6 @@ set(OLIVE_SOURCES
|
|||||||
common/ffmpegutils.h
|
common/ffmpegutils.h
|
||||||
common/filefunctions.cpp
|
common/filefunctions.cpp
|
||||||
common/filefunctions.h
|
common/filefunctions.h
|
||||||
common/flipmodifiers.cpp
|
|
||||||
common/flipmodifiers.h
|
|
||||||
common/functiontimer.h
|
|
||||||
common/html.cpp
|
common/html.cpp
|
||||||
common/html.h
|
common/html.h
|
||||||
common/jobtime.cpp
|
common/jobtime.cpp
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
/***
|
|
||||||
|
|
||||||
Olive - Non-Linear Video Editor
|
|
||||||
Copyright (C) 2022 Olive Team
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
***/
|
|
||||||
|
|
||||||
#include "flipmodifiers.h"
|
|
||||||
|
|
||||||
namespace olive {
|
|
||||||
|
|
||||||
Qt::KeyboardModifiers FlipControlAndShiftModifiers(Qt::KeyboardModifiers e) {
|
|
||||||
if (e & Qt::ControlModifier & Qt::ShiftModifier) {
|
|
||||||
return e;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e & Qt::ShiftModifier) {
|
|
||||||
e |= Qt::ControlModifier;
|
|
||||||
e &= ~Qt::ShiftModifier;
|
|
||||||
} else if (e & Qt::ControlModifier) {
|
|
||||||
e |= Qt::ShiftModifier;
|
|
||||||
e &= ~Qt::ControlModifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
return e;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
/***
|
|
||||||
|
|
||||||
Olive - Non-Linear Video Editor
|
|
||||||
Copyright (C) 2022 Olive Team
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
***/
|
|
||||||
|
|
||||||
#ifndef FLIPMODIFIERS_H
|
|
||||||
#define FLIPMODIFIERS_H
|
|
||||||
|
|
||||||
#include <QtCore>
|
|
||||||
|
|
||||||
#include "common/define.h"
|
|
||||||
|
|
||||||
namespace olive {
|
|
||||||
|
|
||||||
Qt::KeyboardModifiers FlipControlAndShiftModifiers(Qt::KeyboardModifiers e);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // FLIPMODIFIERS_H
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
/***
|
|
||||||
|
|
||||||
Olive - Non-Linear Video Editor
|
|
||||||
Copyright (C) 2022 Olive Team
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
***/
|
|
||||||
|
|
||||||
#ifndef FUNCTIONTIMER_H
|
|
||||||
#define FUNCTIONTIMER_H
|
|
||||||
|
|
||||||
#include <QDateTime>
|
|
||||||
#include <QDebug>
|
|
||||||
|
|
||||||
#define TIME_THIS_FUNCTION FunctionTimer __f(__FUNCTION__)
|
|
||||||
#define START_TIMING {FunctionTimer *__f = new FunctionTimer(__FUNCTION__)
|
|
||||||
#define STOP_TIMING delete __f;}void()
|
|
||||||
|
|
||||||
class FunctionTimer {
|
|
||||||
public:
|
|
||||||
FunctionTimer(const char* s)
|
|
||||||
{
|
|
||||||
name_ = s;
|
|
||||||
time_ = QDateTime::currentMSecsSinceEpoch();
|
|
||||||
}
|
|
||||||
|
|
||||||
~FunctionTimer()
|
|
||||||
{
|
|
||||||
qint64 elapsed = (QDateTime::currentMSecsSinceEpoch() - time_);
|
|
||||||
|
|
||||||
if (elapsed > 1) {
|
|
||||||
qDebug() << name_ << "took" << elapsed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
const char* name_;
|
|
||||||
|
|
||||||
qint64 time_;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // FUNCTIONTIMER_H
|
|
||||||
@@ -115,4 +115,21 @@ QStringList QtUtils::WordWrapString(const QString &s, const QFontMetrics &fm, in
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Qt::KeyboardModifiers QtUtils::FlipControlAndShiftModifiers(Qt::KeyboardModifiers e)
|
||||||
|
{
|
||||||
|
if (e & Qt::ControlModifier & Qt::ShiftModifier) {
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e & Qt::ShiftModifier) {
|
||||||
|
e |= Qt::ControlModifier;
|
||||||
|
e &= ~Qt::ShiftModifier;
|
||||||
|
} else if (e & Qt::ControlModifier) {
|
||||||
|
e |= Qt::ShiftModifier;
|
||||||
|
e &= ~Qt::ControlModifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ public:
|
|||||||
|
|
||||||
static QStringList WordWrapString(const QString &s, const QFontMetrics &fm, int bounding_width);
|
static QStringList WordWrapString(const QString &s, const QFontMetrics &fm, int bounding_width);
|
||||||
|
|
||||||
|
static Qt::KeyboardModifiers FlipControlAndShiftModifiers(Qt::KeyboardModifiers e);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
|
|
||||||
#include "common/cpuoptimize.h"
|
#include "common/cpuoptimize.h"
|
||||||
#include "common/functiontimer.h"
|
|
||||||
|
|
||||||
namespace olive {
|
namespace olive {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
|
|
||||||
#include "common/functiontimer.h"
|
|
||||||
#include "common/html.h"
|
#include "common/html.h"
|
||||||
#include "node/project/project.h"
|
#include "node/project/project.h"
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QSplitter>
|
#include <QSplitter>
|
||||||
|
|
||||||
#include "common/functiontimer.h"
|
|
||||||
#include "common/timecodefunctions.h"
|
#include "common/timecodefunctions.h"
|
||||||
#include "node/output/viewer/viewer.h"
|
#include "node/output/viewer/viewer.h"
|
||||||
#include "node/project/serializer/serializer.h"
|
#include "node/project/serializer/serializer.h"
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QStyleOptionGraphicsItem>
|
#include <QStyleOptionGraphicsItem>
|
||||||
|
|
||||||
#include "common/flipmodifiers.h"
|
|
||||||
#include "common/qtutils.h"
|
#include "common/qtutils.h"
|
||||||
#include "config/config.h"
|
#include "config/config.h"
|
||||||
#include "core.h"
|
#include "core.h"
|
||||||
@@ -434,7 +433,7 @@ void NodeViewItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
event->setModifiers(FlipControlAndShiftModifiers(event->modifiers()));
|
event->setModifiers(QtUtils::FlipControlAndShiftModifiers(event->modifiers()));
|
||||||
|
|
||||||
QGraphicsRectItem::mousePressEvent(event);
|
QGraphicsRectItem::mousePressEvent(event);
|
||||||
}
|
}
|
||||||
@@ -445,7 +444,7 @@ void NodeViewItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
event->setModifiers(FlipControlAndShiftModifiers(event->modifiers()));
|
event->setModifiers(QtUtils::FlipControlAndShiftModifiers(event->modifiers()));
|
||||||
|
|
||||||
QGraphicsRectItem::mouseMoveEvent(event);
|
QGraphicsRectItem::mouseMoveEvent(event);
|
||||||
}
|
}
|
||||||
@@ -457,7 +456,7 @@ void NodeViewItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
event->setModifiers(FlipControlAndShiftModifiers(event->modifiers()));
|
event->setModifiers(QtUtils::FlipControlAndShiftModifiers(event->modifiers()));
|
||||||
|
|
||||||
QGraphicsRectItem::mouseReleaseEvent(event);
|
QGraphicsRectItem::mouseReleaseEvent(event);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
#include "nodeviewscene.h"
|
#include "nodeviewscene.h"
|
||||||
|
|
||||||
#include "common/functiontimer.h"
|
|
||||||
#include "core.h"
|
#include "core.h"
|
||||||
#include "node/project/sequence/sequence.h"
|
#include "node/project/sequence/sequence.h"
|
||||||
#include "nodeviewedge.h"
|
#include "nodeviewedge.h"
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
#include <QToolTip>
|
#include <QToolTip>
|
||||||
|
|
||||||
#include "common/clamp.h"
|
#include "common/clamp.h"
|
||||||
#include "common/flipmodifiers.h"
|
|
||||||
#include "common/qtutils.h"
|
#include "common/qtutils.h"
|
||||||
#include "common/range.h"
|
#include "common/range.h"
|
||||||
#include "common/timecodefunctions.h"
|
#include "common/timecodefunctions.h"
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
#include <QPen>
|
#include <QPen>
|
||||||
|
|
||||||
#include "config/config.h"
|
#include "config/config.h"
|
||||||
#include "common/flipmodifiers.h"
|
|
||||||
#include "common/qtutils.h"
|
#include "common/qtutils.h"
|
||||||
#include "common/timecodefunctions.h"
|
#include "common/timecodefunctions.h"
|
||||||
#include "node/project/footage/footage.h"
|
#include "node/project/footage/footage.h"
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
|
|
||||||
#include "common/define.h"
|
#include "common/define.h"
|
||||||
#include "common/functiontimer.h"
|
|
||||||
#include "common/html.h"
|
#include "common/html.h"
|
||||||
#include "common/qtutils.h"
|
#include "common/qtutils.h"
|
||||||
#include "config/config.h"
|
#include "config/config.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user