Merge remote-tracking branch 'origin/5.0' into 6.0

Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I87b19a51b1950d19eff95086848b0728ba2f0ebd
This commit is contained in:
Eike Ziller
2021-10-08 15:58:02 +02:00
5 changed files with 43 additions and 14 deletions

View File

@@ -60,7 +60,7 @@
\li More Information \li More Information
\row \row
\li \inlineimage spot.png \li \inlineimage directional.png
\li Directional Light \li Directional Light
\li \li
\li \l{DirectionalLight}{Light Directional} \li \l{DirectionalLight}{Light Directional}

View File

@@ -126,7 +126,15 @@ Core::IDocument::OpenResult ImageViewerFile::openImpl(QString *errorString,
m_type = TypeMovie; m_type = TypeMovie;
m_movie = new QMovie(fileName, QByteArray(), this); m_movie = new QMovie(fileName, QByteArray(), this);
m_movie->setCacheMode(QMovie::CacheAll); m_movie->setCacheMode(QMovie::CacheAll);
connect(m_movie, &QMovie::finished, m_movie, &QMovie::start); connect(
m_movie,
&QMovie::finished,
m_movie,
[this] {
if (m_movie->isValid())
m_movie->start();
},
Qt::QueuedConnection);
connect(m_movie, &QMovie::resized, this, &ImageViewerFile::imageSizeChanged); connect(m_movie, &QMovie::resized, this, &ImageViewerFile::imageSizeChanged);
m_movie->start(); m_movie->start();
m_isPaused = false; // force update m_isPaused = false; // force update

View File

@@ -110,6 +110,7 @@ QmlJSEditorPlugin::QmlJSEditorPlugin()
QmlJSEditorPlugin::~QmlJSEditorPlugin() QmlJSEditorPlugin::~QmlJSEditorPlugin()
{ {
delete QmlJS::Icons::instance(); // delete object held by singleton
delete d; delete d;
d = nullptr; d = nullptr;
m_instance = nullptr; m_instance = nullptr;
@@ -226,8 +227,6 @@ void QmlJSEditorPlugin::extensionsInitialized()
ExtensionSystem::IPlugin::ShutdownFlag QmlJSEditorPlugin::aboutToShutdown() ExtensionSystem::IPlugin::ShutdownFlag QmlJSEditorPlugin::aboutToShutdown()
{ {
delete QmlJS::Icons::instance(); // delete object held by singleton
return IPlugin::aboutToShutdown(); return IPlugin::aboutToShutdown();
} }

View File

@@ -4433,7 +4433,11 @@ namespace qvariant {
// FIXME: Known to break // FIXME: Known to break
//QString type = var.typeName(); //QString type = var.typeName();
var.setValue(my); var.setValue(my);
#if QT_VERSION >= 0x051500
const char *name = QMetaType(var.userType()).name();
#else
const char *name = QMetaType::typeName(var.userType()); const char *name = QMetaType::typeName(var.userType());
#endif
BREAK_HERE; BREAK_HERE;
// Expand my my.0 my.0.value my.1 my.1.value var var.data var.data.0 var.data.0.value var.data.1 var.data.1.value. // Expand my my.0 my.0.value my.1 my.1.value var var.data var.data.0 var.data.0.value var.data.1 var.data.1.value.
// Check my <2 items> qvariant::MyType. // Check my <2 items> qvariant::MyType.
@@ -4706,6 +4710,7 @@ namespace noargs {
{ {
public: public:
Goo(const QString &str, const int n) : str_(str), n_(n) {} Goo(const QString &str, const int n) : str_(str), n_(n) {}
int n() {return n_;}
private: private:
QString str_; QString str_;
int n_; int n_;
@@ -5459,7 +5464,7 @@ namespace basic {
const int &b = a; const int &b = a;
typedef int &Ref; typedef int &Ref;
const int c = 44; const int c = 44;
const Ref d = a; Ref d = a;
BREAK_HERE; BREAK_HERE;
// Check a 43 int. // Check a 43 int.
// Check b 43 int &. // Check b 43 int &.
@@ -5475,7 +5480,7 @@ namespace basic {
const QString &b = fooxx(); const QString &b = fooxx();
typedef QString &Ref; typedef QString &Ref;
const QString c = "world"; const QString c = "world";
const Ref d = a; Ref d = a;
BREAK_HERE; BREAK_HERE;
// Check a "hello" QString. // Check a "hello" QString.
// Check b "bababa" QString &. // Check b "bababa" QString &.
@@ -5489,7 +5494,7 @@ namespace basic {
{ {
const QString &b = a; const QString &b = a;
typedef QString &Ref; typedef QString &Ref;
const Ref d = const_cast<Ref>(a); Ref d = const_cast<Ref>(a);
BREAK_HERE; BREAK_HERE;
// Check a "hello" QString &. // Check a "hello" QString &.
// Check b "hello" QString &. // Check b "hello" QString &.

View File

@@ -87,14 +87,16 @@ def renameFile(projectDir, proFile, branch, oldname, newname):
oldFilePath = os.path.join(projectDir, oldname) oldFilePath = os.path.join(projectDir, oldname)
newFilePath = os.path.join(projectDir, newname) newFilePath = os.path.join(projectDir, newname)
oldFileText = readFile(oldFilePath) oldFileText = readFile(oldFilePath)
itemText = branch + "." + oldname.replace(".", "\\.") oldItemText = branch + "." + oldname.replace(".", "\\.")
newItemText = branch + "." + newname.replace(".", "\\.")
treeview = waitForObject(":Qt Creator_Utils::NavigationTreeView") treeview = waitForObject(":Qt Creator_Utils::NavigationTreeView")
try: try:
openItemContextMenu(treeview, itemText, 5, 5, 0) openItemContextMenu(treeview, oldItemText, 5, 5, 0)
except: except:
itemWithWildcard = addBranchWildcardToRoot(itemText) oldItemText = addBranchWildcardToRoot(oldItemText)
waitForObjectItem(treeview, itemWithWildcard, 10000) newItemText = addBranchWildcardToRoot(newItemText)
openItemContextMenu(treeview, itemWithWildcard, 5, 5, 0) waitForObjectItem(treeview, oldItemText, 10000)
openItemContextMenu(treeview, oldItemText, 5, 5, 0)
if oldname.lower().endswith(".qrc"): if oldname.lower().endswith(".qrc"):
menu = ":Qt Creator.Project.Menu.Folder_QMenu" menu = ":Qt Creator.Project.Menu.Folder_QMenu"
else: else:
@@ -111,10 +113,18 @@ def renameFile(projectDir, proFile, branch, oldname, newname):
" windowTitle='Rename More Files?'}}")) " windowTitle='Rename More Files?'}}"))
test.verify(waitFor("os.path.exists(newFilePath)", 1000), test.verify(waitFor("os.path.exists(newFilePath)", 1000),
"Verify that file with new name exists: %s" % newFilePath) "Verify that file with new name exists: %s" % newFilePath)
test.compare(readFile(newFilePath), oldFileText,
"Comparing content of file before and after renaming")
test.verify(waitFor("' ' + newname in safeReadFile(proFile)", 2000), test.verify(waitFor("' ' + newname in safeReadFile(proFile)", 2000),
"Verify that new filename '%s' was added to pro-file." % newname) "Verify that new filename '%s' was added to pro-file." % newname)
if oldname.endswith(".h"):
# Creator updates include guards in renamed header files and changes line breaks
oldFileText = oldFileText.replace("\r\n", "\n")
includeGuard = " " + newname.upper().replace(".", "_")
if not includeGuard.endswith("_H"):
includeGuard += "_H"
oldFileText = oldFileText.replace(" " + oldname.upper().replace(".", "_"), includeGuard)
waitFor("includeGuard in safeReadFile(newFilePath)", 2000)
test.compare(readFile(newFilePath), oldFileText,
"Comparing content of file before and after renaming")
if oldname not in newname: if oldname not in newname:
test.verify(oldname not in readFile(proFile), test.verify(oldname not in readFile(proFile),
"Verify that old filename '%s' was removed from pro-file." % oldname) "Verify that old filename '%s' was removed from pro-file." % oldname)
@@ -122,6 +132,13 @@ def renameFile(projectDir, proFile, branch, oldname, newname):
test.verify(oldname not in os.listdir(projectDir), test.verify(oldname not in os.listdir(projectDir),
"Verify that file with old name does not exist: %s" % oldFilePath) "Verify that file with old name does not exist: %s" % oldFilePath)
if newItemText.endswith("\\.qml"):
newItemText = newItemText.replace(".Other files.", ".QML.")
else:
newItemText = newItemText.replace(".QML.", ".Other files.")
waitForObjectItem(treeview, newItemText)
def safeReadFile(filename): def safeReadFile(filename):
text = "" text = ""
while text == "": while text == "":