use hardcoded namespace

The macro defined namespaces confused the hell out of lupdate and more or less broke translations permanently. Looks like the only way we can do it is to have a hardcoded namespace, which goes against my instinct, but honestly how likely is it that we'll change the namespace anyway (I guess forks might want to do it, but that's their problem ;) )
This commit is contained in:
itsmattkc
2020-11-17 20:24:42 +11:00
parent d241090a9f
commit 75d4cd899b
626 changed files with 1971 additions and 1972 deletions
+15 -15
View File
@@ -27,7 +27,7 @@
#include "node/generator/text/text.h"
#include "widget/nodeview/nodeviewundo.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
AddTool::AddTool(TimelineWidget *parent) :
BeamTool(parent),
@@ -48,18 +48,18 @@ void AddTool::MousePress(TimelineViewMouseEvent *event)
Timeline::TrackType add_type = Timeline::kTrackTypeNone;
switch (Core::instance()->GetSelectedAddableObject()) {
case OLIVE_NAMESPACE::Tool::kAddableBars:
case OLIVE_NAMESPACE::Tool::kAddableSolid:
case OLIVE_NAMESPACE::Tool::kAddableTitle:
case olive::Tool::kAddableBars:
case olive::Tool::kAddableSolid:
case olive::Tool::kAddableTitle:
add_type = Timeline::kTrackTypeVideo;
break;
case OLIVE_NAMESPACE::Tool::kAddableTone:
case olive::Tool::kAddableTone:
add_type = Timeline::kTrackTypeAudio;
break;
case OLIVE_NAMESPACE::Tool::kAddableEmpty:
case olive::Tool::kAddableEmpty:
// Leave as "none", which means this block can be placed on any track
break;
case OLIVE_NAMESPACE::Tool::kAddableCount:
case olive::Tool::kAddableCount:
// Return so we do nothing
return;
}
@@ -97,7 +97,7 @@ void AddTool::MouseRelease(TimelineViewMouseEvent *event)
ClipBlock* clip = new ClipBlock();
clip->set_length_and_media_out(ghost_->GetAdjustedLength());
clip->SetLabel(OLIVE_NAMESPACE::Tool::GetAddableObjectName(Core::instance()->GetSelectedAddableObject()));
clip->SetLabel(olive::Tool::GetAddableObjectName(Core::instance()->GetSelectedAddableObject()));
NodeGraph* graph = static_cast<NodeGraph*>(parent()->GetConnectedNode()->parent());
@@ -112,10 +112,10 @@ void AddTool::MouseRelease(TimelineViewMouseEvent *event)
command);
switch (Core::instance()->GetSelectedAddableObject()) {
case OLIVE_NAMESPACE::Tool::kAddableEmpty:
case olive::Tool::kAddableEmpty:
// Empty, nothing to be done
break;
case OLIVE_NAMESPACE::Tool::kAddableSolid:
case olive::Tool::kAddableSolid:
{
Node* solid = new SolidGenerator();
@@ -126,7 +126,7 @@ void AddTool::MouseRelease(TimelineViewMouseEvent *event)
new NodeEdgeAddCommand(solid->output(), clip->texture_input(), command);
break;
}
case OLIVE_NAMESPACE::Tool::kAddableTitle:
case olive::Tool::kAddableTitle:
{
Node* text = new TextGenerator();
@@ -137,12 +137,12 @@ void AddTool::MouseRelease(TimelineViewMouseEvent *event)
new NodeEdgeAddCommand(text->output(), clip->texture_input(), command);
break;
}
case OLIVE_NAMESPACE::Tool::kAddableBars:
case OLIVE_NAMESPACE::Tool::kAddableTone:
case olive::Tool::kAddableBars:
case olive::Tool::kAddableTone:
// Not implemented yet
qWarning() << "Unimplemented add object:" << Core::instance()->GetSelectedAddableObject();
break;
case OLIVE_NAMESPACE::Tool::kAddableCount:
case olive::Tool::kAddableCount:
// Invalid value, do nothing
break;
}
@@ -190,4 +190,4 @@ void AddTool::MouseMoveInternal(const rational &cursor_frame, bool outwards)
}
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -23,7 +23,7 @@
#include "beam.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class AddTool : public BeamTool
{
@@ -42,6 +42,6 @@ protected:
rational drag_start_point_;
};
OLIVE_NAMESPACE_EXIT
}
#endif // ADDTIMELINETOOL_H
+2 -2
View File
@@ -21,7 +21,7 @@
#include "beam.h"
#include "widget/timelinewidget/timelinewidget.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
BeamTool::BeamTool(TimelineWidget *parent) :
TimelineTool(parent)
@@ -46,4 +46,4 @@ TimelineCoordinate BeamTool::ValidatedCoordinate(TimelineCoordinate coord)
return coord;
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -23,7 +23,7 @@
#include "tool.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class BeamTool : public TimelineTool
{
@@ -37,6 +37,6 @@ protected:
};
OLIVE_NAMESPACE_EXIT
}
#endif // BEAMTIMELINETOOL_H
+2 -2
View File
@@ -21,7 +21,7 @@
#include "edit.h"
#include "widget/timelinewidget/timelinewidget.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
EditTool::EditTool(TimelineWidget* parent) :
BeamTool(parent)
@@ -85,4 +85,4 @@ void EditTool::MouseDoubleClick(TimelineViewMouseEvent *event)
}
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -25,7 +25,7 @@
#include "tool.h"
#include "widget/timelinewidget/timelinewidgetselections.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class EditTool : public BeamTool
{
@@ -44,6 +44,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
#endif // EDITTIMELINETOOL_H
+2 -2
View File
@@ -38,7 +38,7 @@
#include "widget/nodeview/nodeviewundo.h"
#include "window/mainwindow/mainwindow.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
Timeline::TrackType TrackTypeFromStreamType(Stream::Type stream_type)
{
@@ -498,4 +498,4 @@ QList<ImportTool::DraggedFootage> ImportTool::FootageToDraggedFootage(QList<Foot
return df;
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -23,7 +23,7 @@
#include "tool.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class ImportTool : public TimelineTool
{
@@ -84,6 +84,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
#endif // IMPORTTIMELINETOOL_H
+2 -2
View File
@@ -35,7 +35,7 @@
#include "pointer.h"
#include "widget/nodeview/nodeviewundo.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
PointerTool::PointerTool(TimelineWidget *parent) :
TimelineTool(parent),
@@ -924,4 +924,4 @@ rational PointerTool::ValidateOutTrimming(rational movement)
return movement;
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -23,7 +23,7 @@
#include "tool.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class PointerTool : public TimelineTool
{
@@ -122,6 +122,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
#endif // POINTERTIMELINETOOL_H
+2 -2
View File
@@ -21,7 +21,7 @@
#include "razor.h"
#include "widget/timelinewidget/timelinewidget.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
RazorTool::RazorTool(TimelineWidget* parent) :
BeamTool(parent)
@@ -94,4 +94,4 @@ void RazorTool::MouseRelease(TimelineViewMouseEvent *event)
dragging_ = false;
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -23,7 +23,7 @@
#include "beam.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class RazorTool : public BeamTool
{
@@ -38,6 +38,6 @@ private:
QVector<TrackReference> split_tracks_;
};
OLIVE_NAMESPACE_EXIT
}
#endif // RAZORTIMELINETOOL_H
+2 -2
View File
@@ -24,7 +24,7 @@
#include "ripple.h"
#include "widget/nodeview/nodeviewundo.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
RippleTool::RippleTool(TimelineWidget* parent) :
PointerTool(parent)
@@ -147,4 +147,4 @@ void RippleTool::FinishDrag(TimelineViewMouseEvent *event)
}
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -23,7 +23,7 @@
#include "pointer.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class RippleTool : public PointerTool
{
@@ -36,6 +36,6 @@ protected:
Timeline::MovementMode trim_mode) override;
};
OLIVE_NAMESPACE_EXIT
}
#endif // RIPPLETIMELINETOOL_H
+2 -2
View File
@@ -24,7 +24,7 @@
#include "rolling.h"
#include "widget/nodeview/nodeviewundo.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
RollingTool::RollingTool(TimelineWidget* parent) :
PointerTool(parent)
@@ -39,4 +39,4 @@ void RollingTool::InitiateDrag(TimelineViewBlockItem *clicked_item,
InitiateDragInternal(clicked_item, trim_mode, false, true, false);
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -23,7 +23,7 @@
#include "pointer.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class RollingTool : public PointerTool
{
@@ -35,6 +35,6 @@ protected:
Timeline::MovementMode trim_mode) override;
};
OLIVE_NAMESPACE_EXIT
}
#endif // ROLLINGTIMELINETOOL_H
+2 -2
View File
@@ -24,7 +24,7 @@
#include "slide.h"
#include "widget/nodeview/nodeviewundo.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
SlideTool::SlideTool(TimelineWidget* parent) :
PointerTool(parent)
@@ -40,4 +40,4 @@ void SlideTool::InitiateDrag(TimelineViewBlockItem *clicked_item,
InitiateDragInternal(clicked_item, trim_mode, false, true, true);
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -23,7 +23,7 @@
#include "pointer.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class SlideTool : public PointerTool
{
@@ -36,6 +36,6 @@ protected:
};
OLIVE_NAMESPACE_EXIT
}
#endif // SLIDETIMELINETOOL_H
+2 -2
View File
@@ -26,7 +26,7 @@
#include "config/config.h"
#include "slip.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
SlipTool::SlipTool(TimelineWidget *parent) :
PointerTool(parent)
@@ -79,4 +79,4 @@ void SlipTool::FinishDrag(TimelineViewMouseEvent *event)
Core::instance()->undo_stack()->pushIfHasChildren(command);
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -23,7 +23,7 @@
#include "pointer.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class SlipTool : public PointerTool
{
@@ -35,6 +35,6 @@ protected:
virtual void FinishDrag(TimelineViewMouseEvent *event) override;
};
OLIVE_NAMESPACE_EXIT
}
#endif // SLIPTIMELINETOOL_H
+2 -2
View File
@@ -23,7 +23,7 @@
#include "node/block/transition/transition.h"
#include "widget/nodeview/nodeviewundo.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
TimelineTool::TimelineTool(TimelineWidget *parent) :
dragging_(false),
@@ -119,4 +119,4 @@ void TimelineTool::InsertGapsAtGhostDestination(QUndoCommand *command)
parent()->InsertGapsAt(earliest_point, latest_point - earliest_point, command);
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -27,7 +27,7 @@
#include "widget/timelinewidget/view/timelineviewghostitem.h"
#include "widget/timelinewidget/view/timelineviewmouseevent.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class TimelineWidget;
@@ -84,6 +84,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
#endif // TIMELINETOOL_H
@@ -26,7 +26,7 @@
#include "transition.h"
#include "widget/nodeview/nodeviewundo.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
TransitionTool::TransitionTool(TimelineWidget *parent) :
AddTool(parent)
@@ -181,4 +181,4 @@ void TransitionTool::MouseRelease(TimelineViewMouseEvent *event)
}
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -23,7 +23,7 @@
#include "add.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class TransitionTool : public AddTool
{
@@ -37,6 +37,6 @@ private:
bool dual_transition_;
};
OLIVE_NAMESPACE_EXIT
}
#endif // TRANSITIONTIMELINETOOL_H
+2 -2
View File
@@ -21,7 +21,7 @@
#include "widget/timelinewidget/timelinewidget.h"
#include "zoom.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
ZoomTool::ZoomTool(TimelineWidget *parent) :
TimelineTool(parent)
@@ -96,4 +96,4 @@ void ZoomTool::MouseRelease(TimelineViewMouseEvent *event)
parent()->QueueScroll(scroll_value);
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -23,7 +23,7 @@
#include "tool.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class ZoomTool : public TimelineTool
{
@@ -36,6 +36,6 @@ public:
};
OLIVE_NAMESPACE_EXIT
}
#endif // ZOOMTIMELINETOOL_H