forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/6.0' into qds-2.3
Change-Id: I540441b954a176aabd236cfc7e07e24df7b6592a
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
set(IDE_VERSION "6.0.0") # The IDE version.
|
set(IDE_VERSION "6.0.1") # The IDE version.
|
||||||
set(IDE_VERSION_COMPAT "6.0.0") # The IDE Compatibility version.
|
set(IDE_VERSION_COMPAT "6.0.0") # The IDE Compatibility version.
|
||||||
set(IDE_VERSION_DISPLAY "6.0.0") # The IDE display version.
|
set(IDE_VERSION_DISPLAY "6.0.1") # The IDE display version.
|
||||||
set(IDE_COPYRIGHT_YEAR "2021") # The IDE current copyright year.
|
set(IDE_COPYRIGHT_YEAR "2021") # The IDE current copyright year.
|
||||||
|
|
||||||
set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation.
|
set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation.
|
||||||
|
@@ -3,10 +3,10 @@ import qbs.Environment
|
|||||||
import qbs.FileInfo
|
import qbs.FileInfo
|
||||||
|
|
||||||
Module {
|
Module {
|
||||||
property string qtcreator_display_version: '6.0.0'
|
property string qtcreator_display_version: '6.0.1'
|
||||||
property string ide_version_major: '6'
|
property string ide_version_major: '6'
|
||||||
property string ide_version_minor: '0'
|
property string ide_version_minor: '0'
|
||||||
property string ide_version_release: '0'
|
property string ide_version_release: '1'
|
||||||
property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.'
|
property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.'
|
||||||
+ ide_version_release
|
+ ide_version_release
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
QTCREATOR_VERSION = 6.0.0
|
QTCREATOR_VERSION = 6.0.1
|
||||||
QTCREATOR_COMPAT_VERSION = 6.0.0
|
QTCREATOR_COMPAT_VERSION = 6.0.0
|
||||||
QTCREATOR_DISPLAY_VERSION = 6.0.0
|
QTCREATOR_DISPLAY_VERSION = 6.0.1
|
||||||
QTCREATOR_COPYRIGHT_YEAR = 2021
|
QTCREATOR_COPYRIGHT_YEAR = 2021
|
||||||
|
|
||||||
IDE_DISPLAY_NAME = Qt Creator
|
IDE_DISPLAY_NAME = Qt Creator
|
||||||
|
@@ -31,8 +31,6 @@ AnimationDriver::AnimationDriver(QObject *parent)
|
|||||||
{
|
{
|
||||||
setProperty("allowNegativeDelta", true);
|
setProperty("allowNegativeDelta", true);
|
||||||
install();
|
install();
|
||||||
connect(this, SIGNAL(started()), this, SLOT(startTimer()));
|
|
||||||
connect(this, SIGNAL(stopped()), this, SLOT(stopTimer()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationDriver::~AnimationDriver()
|
AnimationDriver::~AnimationDriver()
|
||||||
@@ -49,10 +47,13 @@ void AnimationDriver::timerEvent(QTimerEvent *e)
|
|||||||
// Provide same time for all users
|
// Provide same time for all users
|
||||||
if (m_seekerEnabled) {
|
if (m_seekerEnabled) {
|
||||||
m_seekerElapsed += (m_seekerPos * 100) / 30;
|
m_seekerElapsed += (m_seekerPos * 100) / 30;
|
||||||
if (m_seekerElapsed + m_elapsed < -100) // -100 to allow small negative value
|
if (m_seekerElapsed + m_elapsed - m_pauseTime < -100) // -100 to allow small negative value
|
||||||
m_seekerElapsed = -m_elapsed - 100;
|
m_seekerElapsed = -(m_elapsed - m_pauseTime) - 100;
|
||||||
} else {
|
} else {
|
||||||
m_elapsed = QAnimationDriver::elapsed();
|
if (!m_elapsedTimer.isValid())
|
||||||
|
m_elapsedTimer.restart();
|
||||||
|
else
|
||||||
|
m_elapsed = m_elapsedTimer.elapsed();
|
||||||
}
|
}
|
||||||
m_delta = elapsed() - old;
|
m_delta = elapsed() - old;
|
||||||
advance();
|
advance();
|
||||||
@@ -75,7 +76,7 @@ void AnimationDriver::setSeekerPosition(int position)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!m_timer.isActive())
|
if (!m_timer.isActive())
|
||||||
restart();
|
startTimer();
|
||||||
|
|
||||||
m_seekerPos = position;
|
m_seekerPos = position;
|
||||||
}
|
}
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include <qabstractanimation.h>
|
#include <qabstractanimation.h>
|
||||||
#include <QtCore/qbasictimer.h>
|
#include <QtCore/qbasictimer.h>
|
||||||
|
#include <QtCore/qelapsedtimer.h>
|
||||||
#include <QtCore/qmath.h>
|
#include <QtCore/qmath.h>
|
||||||
|
|
||||||
class AnimationDriver : public QAnimationDriver
|
class AnimationDriver : public QAnimationDriver
|
||||||
@@ -46,17 +47,34 @@ public:
|
|||||||
}
|
}
|
||||||
void reset()
|
void reset()
|
||||||
{
|
{
|
||||||
stop();
|
m_elapsedTimer.invalidate();
|
||||||
|
m_pauseBegin = 0;
|
||||||
|
m_pauseTime = 0;
|
||||||
|
m_elapsed = 0;
|
||||||
|
m_seekerElapsed = 0;
|
||||||
stopTimer();
|
stopTimer();
|
||||||
}
|
}
|
||||||
void restart()
|
void restart()
|
||||||
{
|
{
|
||||||
start();
|
m_pauseTime = 0;
|
||||||
|
m_elapsed = 0;
|
||||||
|
m_seekerElapsed = 0;
|
||||||
|
startTimer();
|
||||||
|
}
|
||||||
|
void pause()
|
||||||
|
{
|
||||||
|
m_pauseBegin = m_elapsedTimer.elapsed();
|
||||||
|
stopTimer();
|
||||||
|
}
|
||||||
|
void play()
|
||||||
|
{
|
||||||
|
if (m_elapsedTimer.isValid())
|
||||||
|
m_pauseTime += m_elapsedTimer.elapsed() - m_pauseBegin;
|
||||||
startTimer();
|
startTimer();
|
||||||
}
|
}
|
||||||
qint64 elapsed() const override
|
qint64 elapsed() const override
|
||||||
{
|
{
|
||||||
return m_elapsed + m_seekerElapsed;
|
return m_elapsed + m_seekerElapsed - m_pauseTime;
|
||||||
}
|
}
|
||||||
void setSeekerPosition(int position);
|
void setSeekerPosition(int position);
|
||||||
void setSeekerEnabled(bool enable)
|
void setSeekerEnabled(bool enable)
|
||||||
@@ -79,10 +97,13 @@ private:
|
|||||||
Q_SLOT void stopTimer();
|
Q_SLOT void stopTimer();
|
||||||
|
|
||||||
QBasicTimer m_timer;
|
QBasicTimer m_timer;
|
||||||
|
QElapsedTimer m_elapsedTimer;
|
||||||
int m_interval = 16;
|
int m_interval = 16;
|
||||||
int m_seekerPos = 0;
|
int m_seekerPos = 0;
|
||||||
bool m_seekerEnabled = false;
|
bool m_seekerEnabled = false;
|
||||||
qint64 m_elapsed = 0;
|
qint64 m_elapsed = 0;
|
||||||
qint64 m_seekerElapsed = 0;
|
qint64 m_seekerElapsed = 0;
|
||||||
qint64 m_delta = 0;
|
qint64 m_delta = 0;
|
||||||
|
qint64 m_pauseTime = 0;
|
||||||
|
qint64 m_pauseBegin = 0;
|
||||||
};
|
};
|
||||||
|
@@ -2078,21 +2078,21 @@ void Qt5InformationNodeInstanceServer::view3DAction(const View3DActionCommand &c
|
|||||||
m_particleAnimationPlaying = command.isEnabled();
|
m_particleAnimationPlaying = command.isEnabled();
|
||||||
updatedState.insert("particlePlay", command.isEnabled());
|
updatedState.insert("particlePlay", command.isEnabled());
|
||||||
if (m_particleAnimationPlaying) {
|
if (m_particleAnimationPlaying) {
|
||||||
m_particleAnimationDriver->reset();
|
m_particleAnimationDriver->play();
|
||||||
m_particleAnimationDriver->restart();
|
|
||||||
m_particleAnimationDriver->setSeekerEnabled(false);
|
m_particleAnimationDriver->setSeekerEnabled(false);
|
||||||
m_particleAnimationDriver->setSeekerPosition(0);
|
m_particleAnimationDriver->setSeekerPosition(0);
|
||||||
} else {
|
} else {
|
||||||
m_particleAnimationDriver->reset();
|
m_particleAnimationDriver->pause();
|
||||||
m_particleAnimationDriver->setSeekerEnabled(true);
|
m_particleAnimationDriver->setSeekerEnabled(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case View3DActionCommand::ParticlesRestart:
|
case View3DActionCommand::ParticlesRestart:
|
||||||
resetParticleSystem();
|
resetParticleSystem();
|
||||||
m_particleAnimationPlaying = true;
|
if (m_particleAnimationPlaying) {
|
||||||
m_particleAnimationDriver->restart();
|
m_particleAnimationDriver->restart();
|
||||||
m_particleAnimationDriver->setSeekerEnabled(false);
|
m_particleAnimationDriver->setSeekerEnabled(false);
|
||||||
m_particleAnimationDriver->setSeekerPosition(0);
|
m_particleAnimationDriver->setSeekerPosition(0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case View3DActionCommand::ParticlesSeek:
|
case View3DActionCommand::ParticlesSeek:
|
||||||
m_particleAnimationDriver->setSeekerPosition(static_cast<const View3DSeekActionCommand &>(command).position());
|
m_particleAnimationDriver->setSeekerPosition(static_cast<const View3DSeekActionCommand &>(command).position());
|
||||||
|
@@ -61,6 +61,10 @@
|
|||||||
#include <private/qqmlmetatype_p.h>
|
#include <private/qqmlmetatype_p.h>
|
||||||
#include <private/qqmltimer_p.h>
|
#include <private/qqmltimer_p.h>
|
||||||
|
|
||||||
|
#ifdef QUICK3D_MODULE
|
||||||
|
#include <private/qquick3dobject_p.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -374,6 +378,11 @@ void doComponentCompleteRecursive(QObject *object, NodeInstanceServer *nodeInsta
|
|||||||
|
|
||||||
if (item && DesignerSupport::isComponentComplete(item))
|
if (item && DesignerSupport::isComponentComplete(item))
|
||||||
return;
|
return;
|
||||||
|
#ifdef QUICK3D_MODULE
|
||||||
|
auto obj3d = qobject_cast<QQuick3DObject *>(object);
|
||||||
|
if (obj3d && QQuick3DObjectPrivate::get(obj3d)->componentComplete)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!nodeInstanceServer->hasInstanceForObject(item))
|
if (!nodeInstanceServer->hasInstanceForObject(item))
|
||||||
emitComponentComplete(object);
|
emitComponentComplete(object);
|
||||||
|
@@ -1,67 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2021 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator.
|
|
||||||
**
|
|
||||||
** Commercial License Usage
|
|
||||||
** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
** accordance with the commercial license agreement provided with the
|
|
||||||
** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
** a written agreement between you and The Qt Company. For licensing terms
|
|
||||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
||||||
** information use the contact form at https://www.qt.io/contact-us.
|
|
||||||
**
|
|
||||||
** GNU General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU
|
|
||||||
** General Public License version 3 as published by the Free Software
|
|
||||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
||||||
** included in the packaging of this file. Please review the following
|
|
||||||
** information to ensure the GNU General Public License requirements will
|
|
||||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
import QtQuick 2.15
|
|
||||||
import QtQuick.Layouts 1.15
|
|
||||||
import HelperWidgets 2.0
|
|
||||||
import StudioControls 1.0 as StudioControls
|
|
||||||
import StudioTheme 1.0 as StudioTheme
|
|
||||||
|
|
||||||
Section {
|
|
||||||
caption: qsTr("Audio")
|
|
||||||
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
SectionLayout {
|
|
||||||
PropertyLabel { text: qsTr("Volume") }
|
|
||||||
|
|
||||||
SecondColumnLayout {
|
|
||||||
SpinBox {
|
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
||||||
+ StudioTheme.Values.actionIndicatorWidth
|
|
||||||
backendValue: backendValues.volume
|
|
||||||
decimals: 1
|
|
||||||
minimumValue: 0.0
|
|
||||||
maximumValue: 1.0
|
|
||||||
}
|
|
||||||
|
|
||||||
ExpandingSpacer {}
|
|
||||||
}
|
|
||||||
|
|
||||||
PropertyLabel { text: qsTr("Muted") }
|
|
||||||
|
|
||||||
SecondColumnLayout {
|
|
||||||
CheckBox {
|
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
||||||
+ StudioTheme.Values.actionIndicatorWidth
|
|
||||||
backendValue: backendValues.muted
|
|
||||||
text: backendValues.muted.valueToString
|
|
||||||
}
|
|
||||||
|
|
||||||
ExpandingSpacer {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -52,5 +52,41 @@ Section {
|
|||||||
|
|
||||||
ExpandingSpacer {}
|
ExpandingSpacer {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PropertyLabel {
|
||||||
|
text: qsTr("Audio Output")
|
||||||
|
tooltip: qsTr("Holds the target audio output.")
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondColumnLayout {
|
||||||
|
ItemFilterComboBox {
|
||||||
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
||||||
|
+ StudioTheme.Values.actionIndicatorWidth
|
||||||
|
width: implicitWidth
|
||||||
|
typeFilter: "QtQuick.AudioOutput"
|
||||||
|
validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ }
|
||||||
|
backendValue: backendValues.audioOutput
|
||||||
|
}
|
||||||
|
|
||||||
|
ExpandingSpacer {}
|
||||||
|
}
|
||||||
|
|
||||||
|
PropertyLabel {
|
||||||
|
text: qsTr("Video Output")
|
||||||
|
tooltip: qsTr("Holds the target video output.")
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondColumnLayout {
|
||||||
|
ItemFilterComboBox {
|
||||||
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
||||||
|
+ StudioTheme.Values.actionIndicatorWidth
|
||||||
|
width: implicitWidth
|
||||||
|
typeFilter: "QtQuick.VideoOutput"
|
||||||
|
validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ }
|
||||||
|
backendValue: backendValues.videoOutput
|
||||||
|
}
|
||||||
|
|
||||||
|
ExpandingSpacer {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -23,13 +23,15 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.15
|
||||||
import QtMultimedia 6.0
|
import QtQuick.Layouts 1.15
|
||||||
|
import HelperWidgets 2.0
|
||||||
|
import StudioControls 1.0 as StudioControls
|
||||||
|
import StudioTheme 1.0 as StudioTheme
|
||||||
|
|
||||||
MediaPlayer {
|
Column {
|
||||||
audioOutput: output
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
AudioOutput {
|
VideoSection {}
|
||||||
id: output
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -31,7 +31,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qlitehtml/src/CMakeLists.txt)
|
|||||||
set(QLITEHTML_DEVEL_EXCLUDE_FROM_ALL ON)
|
set(QLITEHTML_DEVEL_EXCLUDE_FROM_ALL ON)
|
||||||
set(QLITEHTML_HEADER_PATH "${IDE_HEADER_INSTALL_PATH}/src/lib/qlitehtml")
|
set(QLITEHTML_HEADER_PATH "${IDE_HEADER_INSTALL_PATH}/src/lib/qlitehtml")
|
||||||
set(QT_VERSION_MAJOR ${Qt5_VERSION_MAJOR})
|
set(QT_VERSION_MAJOR ${Qt5_VERSION_MAJOR})
|
||||||
set(BUILD_TESTING OFF) # otherwise litehtml downloads googletest
|
option(BUILD_TESTING "Build litehtml tests" OFF) # otherwise litehtml downloads googletest
|
||||||
add_subdirectory(qlitehtml/src)
|
add_subdirectory(qlitehtml/src)
|
||||||
endif()
|
endif()
|
||||||
if(TARGET qlitehtml)
|
if(TARGET qlitehtml)
|
||||||
|
@@ -1236,6 +1236,10 @@ bool Check::visit(FunctionExpression *ast)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool isDirectInConnectionsScope =
|
||||||
|
(!m_typeStack.isEmpty() && m_typeStack.last() == "Connections");
|
||||||
|
|
||||||
|
if (!isDirectInConnectionsScope)
|
||||||
addMessage(ErrFunctionsNotSupportedInQmlUi, locationFromRange(locfunc, loclparen));
|
addMessage(ErrFunctionsNotSupportedInQmlUi, locationFromRange(locfunc, loclparen));
|
||||||
|
|
||||||
DeclarationsCheck bodyCheck;
|
DeclarationsCheck bodyCheck;
|
||||||
|
@@ -325,6 +325,13 @@ int main(int argc, char *argv[])
|
|||||||
kill(chldPid, SIGKILL);
|
kill(chldPid, SIGKILL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'i':
|
||||||
|
if (chldPid > 0) {
|
||||||
|
int res = kill(chldPid, SIGINT);
|
||||||
|
if (res)
|
||||||
|
perror("Stub could not interrupt inferior");
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'c': {
|
case 'c': {
|
||||||
int res = write(blockingPipe[1], &c, 1);
|
int res = write(blockingPipe[1], &c, 1);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
|
@@ -590,7 +590,7 @@ FilePath AndroidConfig::openJDKBinPath() const
|
|||||||
|
|
||||||
FilePath AndroidConfig::keytoolPath() const
|
FilePath AndroidConfig::keytoolPath() const
|
||||||
{
|
{
|
||||||
return openJDKBinPath().pathAppended(keytoolName);
|
return openJDKBinPath().pathAppended(keytoolName).withExecutableSuffix();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<AndroidDeviceInfo> AndroidConfig::connectedDevices(QString *error) const
|
QVector<AndroidDeviceInfo> AndroidConfig::connectedDevices(QString *error) const
|
||||||
|
@@ -805,6 +805,13 @@ static bool isDocker(const Kit *k)
|
|||||||
return DeviceTypeKitAspect::deviceTypeId(k) == Docker::Constants::DOCKER_DEVICE_TYPE;
|
return DeviceTypeKitAspect::deviceTypeId(k) == Docker::Constants::DOCKER_DEVICE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool isWindowsARM64(const Kit *k)
|
||||||
|
{
|
||||||
|
const auto targetAbi = ToolChainKitAspect::cxxToolChain(k)->targetAbi();
|
||||||
|
return targetAbi.os() == Abi::WindowsOS && targetAbi.architecture() == Abi::ArmArchitecture
|
||||||
|
&& targetAbi.wordWidth() == 64;
|
||||||
|
}
|
||||||
|
|
||||||
static QStringList defaultInitialCMakeArguments(const Kit *k, const QString buildType)
|
static QStringList defaultInitialCMakeArguments(const Kit *k, const QString buildType)
|
||||||
{
|
{
|
||||||
// Generator:
|
// Generator:
|
||||||
@@ -991,7 +998,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
|||||||
initialArgs.append("%{" + QLatin1String(CMAKE_OSX_ARCHITECTURES_FLAG) + "}");
|
initialArgs.append("%{" + QLatin1String(CMAKE_OSX_ARCHITECTURES_FLAG) + "}");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isWebAssembly(k) || isQnx(k)) {
|
if (isWebAssembly(k) || isQnx(k) || isWindowsARM64(k)) {
|
||||||
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||||
if (qt && qt->qtVersion().majorVersion >= 6)
|
if (qt && qt->qtVersion().majorVersion >= 6)
|
||||||
initialArgs.append(CMAKE_QT6_TOOLCHAIN_FILE_ARG);
|
initialArgs.append(CMAKE_QT6_TOOLCHAIN_FILE_ARG);
|
||||||
|
@@ -221,6 +221,7 @@ const int priorityLast = 60;
|
|||||||
const char addImagesDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Image Files");
|
const char addImagesDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Image Files");
|
||||||
const char addFontsDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Font Files");
|
const char addFontsDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Font Files");
|
||||||
const char addSoundsDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Sound Files");
|
const char addSoundsDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Sound Files");
|
||||||
|
const char addVideosDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Video Files");
|
||||||
const char addShadersDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Shader Files");
|
const char addShadersDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Shader Files");
|
||||||
const char add3DAssetsDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "3D Assets");
|
const char add3DAssetsDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "3D Assets");
|
||||||
const char addQt3DSPresentationsDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources",
|
const char addQt3DSPresentationsDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources",
|
||||||
|
@@ -1557,12 +1557,15 @@ void DesignerActionManager::createDefaultAddResourceHandler()
|
|||||||
registerHandlers({"*.otf", "*.ttf"},
|
registerHandlers({"*.otf", "*.ttf"},
|
||||||
ModelNodeOperations::addFontToProject,
|
ModelNodeOperations::addFontToProject,
|
||||||
ComponentCoreConstants::addFontsDisplayString);
|
ComponentCoreConstants::addFontsDisplayString);
|
||||||
registerHandlers({"*.wav"},
|
registerHandlers({"*.wav", "*.mp3"},
|
||||||
ModelNodeOperations::addSoundToProject,
|
ModelNodeOperations::addSoundToProject,
|
||||||
ComponentCoreConstants::addSoundsDisplayString);
|
ComponentCoreConstants::addSoundsDisplayString);
|
||||||
registerHandlers({"*.glsl", "*.glslv", "*.glslf", "*.vsh", "*.fsh", "*.vert", "*.frag"},
|
registerHandlers({"*.glsl", "*.glslv", "*.glslf", "*.vsh", "*.fsh", "*.vert", "*.frag"},
|
||||||
ModelNodeOperations::addShaderToProject,
|
ModelNodeOperations::addShaderToProject,
|
||||||
ComponentCoreConstants::addShadersDisplayString);
|
ComponentCoreConstants::addShadersDisplayString);
|
||||||
|
registerHandlers({"*.mp4"},
|
||||||
|
ModelNodeOperations::addVideoToProject,
|
||||||
|
ComponentCoreConstants::addVideosDisplayString);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesignerActionManager::createDefaultModelNodePreviewImageHandlers()
|
void DesignerActionManager::createDefaultModelNodePreviewImageHandlers()
|
||||||
|
@@ -1077,6 +1077,11 @@ AddFilesResult addImageToProject(const QStringList &fileNames, const QString &de
|
|||||||
return addFilesToProject(fileNames, getAssetDefaultDirectory("images", defaultDirectory));
|
return addFilesToProject(fileNames, getAssetDefaultDirectory("images", defaultDirectory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AddFilesResult addVideoToProject(const QStringList &fileNames, const QString &defaultDirectory)
|
||||||
|
{
|
||||||
|
return addFilesToProject(fileNames, getAssetDefaultDirectory("videos", defaultDirectory));
|
||||||
|
}
|
||||||
|
|
||||||
void createFlowActionArea(const SelectionContext &selectionContext)
|
void createFlowActionArea(const SelectionContext &selectionContext)
|
||||||
{
|
{
|
||||||
AbstractView *view = selectionContext.view();
|
AbstractView *view = selectionContext.view();
|
||||||
|
@@ -80,6 +80,7 @@ AddFilesResult addImageToProject(const QStringList &fileNames, const QString &di
|
|||||||
AddFilesResult addFontToProject(const QStringList &fileNames, const QString &directory);
|
AddFilesResult addFontToProject(const QStringList &fileNames, const QString &directory);
|
||||||
AddFilesResult addSoundToProject(const QStringList &fileNames, const QString &directory);
|
AddFilesResult addSoundToProject(const QStringList &fileNames, const QString &directory);
|
||||||
AddFilesResult addShaderToProject(const QStringList &fileNames, const QString &directory);
|
AddFilesResult addShaderToProject(const QStringList &fileNames, const QString &directory);
|
||||||
|
AddFilesResult addVideoToProject(const QStringList &fileNames, const QString &directory);
|
||||||
void createFlowActionArea(const SelectionContext &selectionContext);
|
void createFlowActionArea(const SelectionContext &selectionContext);
|
||||||
void addTransition(const SelectionContext &selectionState);
|
void addTransition(const SelectionContext &selectionState);
|
||||||
void addFlowEffect(const SelectionContext &selectionState, const TypeName &typeName);
|
void addFlowEffect(const SelectionContext &selectionState, const TypeName &typeName);
|
||||||
|
@@ -305,12 +305,6 @@ void Edit3DView::createEdit3DActions()
|
|||||||
resetPuppet();
|
resetPuppet();
|
||||||
};
|
};
|
||||||
|
|
||||||
SelectionContextOperation particlesRestartTrigger = [this](const SelectionContext &) {
|
|
||||||
m_particlesPlayAction->action()->setChecked(true);
|
|
||||||
if (m_seeker)
|
|
||||||
m_seeker->setEnabled(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
SelectionContextOperation particlesPlayTrigger = [this](const SelectionContext &) {
|
SelectionContextOperation particlesPlayTrigger = [this](const SelectionContext &) {
|
||||||
if (m_seeker)
|
if (m_seeker)
|
||||||
m_seeker->setEnabled(!m_particlesPlayAction->action()->isChecked());
|
m_seeker->setEnabled(!m_particlesPlayAction->action()->isChecked());
|
||||||
@@ -334,7 +328,7 @@ void Edit3DView::createEdit3DActions()
|
|||||||
QmlDesigner::Constants::EDIT3D_PARTICLES_RESTART, View3DActionCommand::ParticlesRestart,
|
QmlDesigner::Constants::EDIT3D_PARTICLES_RESTART, View3DActionCommand::ParticlesRestart,
|
||||||
QCoreApplication::translate("ParticlesRestartAction", "Restart Particles"),
|
QCoreApplication::translate("ParticlesRestartAction", "Restart Particles"),
|
||||||
QKeySequence(Qt::Key_E), false, false, Icons::EDIT3D_PARTICLE_RESTART.icon(),
|
QKeySequence(Qt::Key_E), false, false, Icons::EDIT3D_PARTICLE_RESTART.icon(),
|
||||||
Icons::EDIT3D_PARTICLE_RESTART.icon(), particlesRestartTrigger);
|
Icons::EDIT3D_PARTICLE_RESTART.icon());
|
||||||
m_particlesPlayAction->action()->setEnabled(particlemode);
|
m_particlesPlayAction->action()->setEnabled(particlemode);
|
||||||
m_particlesRestartAction->action()->setEnabled(particlemode);
|
m_particlesRestartAction->action()->setEnabled(particlemode);
|
||||||
m_resetAction
|
m_resetAction
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 286 B |
Binary file not shown.
After Width: | Height: | Size: 399 B |
@@ -33,5 +33,7 @@
|
|||||||
<file>images/x@2x.png</file>
|
<file>images/x@2x.png</file>
|
||||||
<file>images/browse.png</file>
|
<file>images/browse.png</file>
|
||||||
<file>images/browse@2x.png</file>
|
<file>images/browse@2x.png</file>
|
||||||
|
<file>images/item-video-icon.png</file>
|
||||||
|
<file>images/item-video-icon@2x.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@@ -54,6 +54,8 @@ QPixmap ItemLibraryAssetsIconProvider::requestPixmap(const QString &id, QSize *s
|
|||||||
pixmap = Utils::StyleHelper::dpiSpecificImageFile(":/ItemLibrary/images/asset_shader_48.png");
|
pixmap = Utils::StyleHelper::dpiSpecificImageFile(":/ItemLibrary/images/asset_shader_48.png");
|
||||||
else if (ItemLibraryAssetsModel::supportedAudioSuffixes().contains(suffix))
|
else if (ItemLibraryAssetsModel::supportedAudioSuffixes().contains(suffix))
|
||||||
pixmap = Utils::StyleHelper::dpiSpecificImageFile(":/ItemLibrary/images/asset_sound_48.png");
|
pixmap = Utils::StyleHelper::dpiSpecificImageFile(":/ItemLibrary/images/asset_sound_48.png");
|
||||||
|
else if (ItemLibraryAssetsModel::supportedVideoSuffixes().contains(suffix))
|
||||||
|
pixmap = Utils::StyleHelper::dpiSpecificImageFile(":/ItemLibrary/images/item-video-icon.png");
|
||||||
|
|
||||||
if (size) {
|
if (size) {
|
||||||
size->setWidth(pixmap.width());
|
size->setWidth(pixmap.width());
|
||||||
|
@@ -167,7 +167,13 @@ const QStringList &ItemLibraryAssetsModel::supportedFontSuffixes()
|
|||||||
|
|
||||||
const QStringList &ItemLibraryAssetsModel::supportedAudioSuffixes()
|
const QStringList &ItemLibraryAssetsModel::supportedAudioSuffixes()
|
||||||
{
|
{
|
||||||
static const QStringList retList {"*.wav"};
|
static const QStringList retList {"*.wav", "*.mp3"};
|
||||||
|
return retList;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QStringList &ItemLibraryAssetsModel::supportedVideoSuffixes()
|
||||||
|
{
|
||||||
|
static const QStringList retList {"*.mp4"};
|
||||||
return retList;
|
return retList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,6 +306,7 @@ const QSet<QString> &ItemLibraryAssetsModel::supportedSuffixes() const
|
|||||||
insertSuffixes(supportedShaderSuffixes());
|
insertSuffixes(supportedShaderSuffixes());
|
||||||
insertSuffixes(supportedFontSuffixes());
|
insertSuffixes(supportedFontSuffixes());
|
||||||
insertSuffixes(supportedAudioSuffixes());
|
insertSuffixes(supportedAudioSuffixes());
|
||||||
|
insertSuffixes(supportedVideoSuffixes());
|
||||||
insertSuffixes(supportedTexture3DSuffixes());
|
insertSuffixes(supportedTexture3DSuffixes());
|
||||||
}
|
}
|
||||||
return allSuffixes;
|
return allSuffixes;
|
||||||
|
@@ -66,6 +66,7 @@ public:
|
|||||||
static const QStringList &supportedShaderSuffixes();
|
static const QStringList &supportedShaderSuffixes();
|
||||||
static const QStringList &supportedFontSuffixes();
|
static const QStringList &supportedFontSuffixes();
|
||||||
static const QStringList &supportedAudioSuffixes();
|
static const QStringList &supportedAudioSuffixes();
|
||||||
|
static const QStringList &supportedVideoSuffixes();
|
||||||
static const QStringList &supportedTexture3DSuffixes();
|
static const QStringList &supportedTexture3DSuffixes();
|
||||||
|
|
||||||
const QSet<QString> &previewableSuffixes() const;
|
const QSet<QString> &previewableSuffixes() const;
|
||||||
|
@@ -552,6 +552,9 @@ QPair<QString, QByteArray> ItemLibraryWidget::getAssetTypeAndData(const QString
|
|||||||
} else if (ItemLibraryAssetsModel::supportedAudioSuffixes().contains(suffix)) {
|
} else if (ItemLibraryAssetsModel::supportedAudioSuffixes().contains(suffix)) {
|
||||||
// No extra data for sounds
|
// No extra data for sounds
|
||||||
return {"application/vnd.bauhaus.libraryresource.sound", {}};
|
return {"application/vnd.bauhaus.libraryresource.sound", {}};
|
||||||
|
} else if (ItemLibraryAssetsModel::supportedVideoSuffixes().contains(suffix)) {
|
||||||
|
// No extra data for videos
|
||||||
|
return {"application/vnd.bauhaus.libraryresource.video", {}};
|
||||||
} else if (ItemLibraryAssetsModel::supportedTexture3DSuffixes().contains(suffix)) {
|
} else if (ItemLibraryAssetsModel::supportedTexture3DSuffixes().contains(suffix)) {
|
||||||
// Data: Image format (suffix)
|
// Data: Image format (suffix)
|
||||||
return {"application/vnd.bauhaus.libraryresource.texture3d", suffix.toUtf8()};
|
return {"application/vnd.bauhaus.libraryresource.texture3d", suffix.toUtf8()};
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 267 B |
Binary file not shown.
Before Width: | Height: | Size: 521 B |
Binary file not shown.
Before Width: | Height: | Size: 1.0 KiB |
@@ -31,7 +31,6 @@
|
|||||||
<file>images/text-edit-icon16.png</file>
|
<file>images/text-edit-icon16.png</file>
|
||||||
<file>images/text-input-icon16.png</file>
|
<file>images/text-input-icon16.png</file>
|
||||||
<file>images/webview-icon16.png</file>
|
<file>images/webview-icon16.png</file>
|
||||||
<file>source/audio.qml</file>
|
|
||||||
<file>source/listview.qml</file>
|
<file>source/listview.qml</file>
|
||||||
<file>source/listviewv2.qml</file>
|
<file>source/listviewv2.qml</file>
|
||||||
<file>source/gridview.qml</file>
|
<file>source/gridview.qml</file>
|
||||||
@@ -84,9 +83,6 @@
|
|||||||
<file>images/loader-icon.png</file>
|
<file>images/loader-icon.png</file>
|
||||||
<file>images/loader-icon@2x.png</file>
|
<file>images/loader-icon@2x.png</file>
|
||||||
<file>images/loader-icon16.png</file>
|
<file>images/loader-icon16.png</file>
|
||||||
<file>images/audio-16px.png</file>
|
|
||||||
<file>images/audio-24px.png</file>
|
|
||||||
<file>images/audio-24px@2x.png</file>
|
|
||||||
<file>images/audio-output-16px.png</file>
|
<file>images/audio-output-16px.png</file>
|
||||||
<file>images/audio-output-24px.png</file>
|
<file>images/audio-output-24px.png</file>
|
||||||
<file>images/audio-output-24px@2x.png</file>
|
<file>images/audio-output-24px@2x.png</file>
|
||||||
|
@@ -522,28 +522,6 @@ MetaInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Type {
|
|
||||||
name: "QtMultimedia.MediaPlayer"
|
|
||||||
icon: ":/qtquickplugin/images/audio-16px.png"
|
|
||||||
|
|
||||||
Hints {
|
|
||||||
visibleInNavigator: true
|
|
||||||
canBeDroppedInNavigator: true
|
|
||||||
canBeDroppedInFormEditor: false
|
|
||||||
canBeContainer: false
|
|
||||||
}
|
|
||||||
|
|
||||||
ItemLibraryEntry {
|
|
||||||
name: "Audio"
|
|
||||||
category: "f.Qt Quick - Multimedia"
|
|
||||||
libraryIcon: ":/qtquickplugin/images/audio-24px.png"
|
|
||||||
version: "6.0"
|
|
||||||
requiredImport: "QtMultimedia"
|
|
||||||
|
|
||||||
QmlSource { source: ":/qtquickplugin/source/audio.qml" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Type {
|
Type {
|
||||||
name: "QtMultimedia.AudioOutput"
|
name: "QtMultimedia.AudioOutput"
|
||||||
icon: ":/qtquickplugin/images/audio-output-16px.png"
|
icon: ":/qtquickplugin/images/audio-output-16px.png"
|
||||||
@@ -564,6 +542,26 @@ MetaInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Type {
|
||||||
|
name: "QtMultimedia.VideoOutput"
|
||||||
|
icon: ":/qtquickplugin/images/video-output-16px.png"
|
||||||
|
|
||||||
|
Hints {
|
||||||
|
visibleInNavigator: true
|
||||||
|
canBeDroppedInNavigator: true
|
||||||
|
canBeDroppedInFormEditor: false
|
||||||
|
canBeContainer: false
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemLibraryEntry {
|
||||||
|
name: "Video Output"
|
||||||
|
category: "f.Qt Quick - Multimedia"
|
||||||
|
libraryIcon: ":/qtquickplugin/images/video-output-24px.png"
|
||||||
|
version: "6.0"
|
||||||
|
requiredImport: "QtMultimedia"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Type {
|
Type {
|
||||||
name: "QtMultimedia.Video"
|
name: "QtMultimedia.Video"
|
||||||
icon: ":/qtquickplugin/images/video-16px.png"
|
icon: ":/qtquickplugin/images/video-16px.png"
|
||||||
|
@@ -6257,10 +6257,10 @@ MultiTextCursor TextEditorWidget::multiTextCursor() const
|
|||||||
|
|
||||||
void TextEditorWidget::setMultiTextCursor(const Utils::MultiTextCursor &cursor)
|
void TextEditorWidget::setMultiTextCursor(const Utils::MultiTextCursor &cursor)
|
||||||
{
|
{
|
||||||
if (d->m_cursors == cursor)
|
const MultiTextCursor oldCursor = d->m_cursors;
|
||||||
return;
|
|
||||||
MultiTextCursor oldCursor = d->m_cursors;
|
|
||||||
const_cast<MultiTextCursor &>(d->m_cursors) = cursor;
|
const_cast<MultiTextCursor &>(d->m_cursors) = cursor;
|
||||||
|
if (oldCursor == d->m_cursors)
|
||||||
|
return;
|
||||||
doSetTextCursor(d->m_cursors.mainCursor(), /*keepMultiSelection*/ true);
|
doSetTextCursor(d->m_cursors.mainCursor(), /*keepMultiSelection*/ true);
|
||||||
QRect updateRect = d->cursorUpdateRect(oldCursor);
|
QRect updateRect = d->cursorUpdateRect(oldCursor);
|
||||||
if (d->m_highlightCurrentLine)
|
if (d->m_highlightCurrentLine)
|
||||||
|
Reference in New Issue
Block a user