forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/14.0'
Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs Change-Id: I00c2cdccf7f2fa9203d1018e90511133b2e08310
This commit is contained in:
19
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
19
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "Parser.h"
|
||||
#include "Token.h"
|
||||
#include "Lexer.h"
|
||||
#include "Control.h"
|
||||
#include "AST.h"
|
||||
#include "Literals.h"
|
||||
@@ -30,7 +29,6 @@
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include <string>
|
||||
#include <cstdio> // for putchar
|
||||
|
||||
#if defined(__INTEL_COMPILER) && !defined(va_copy)
|
||||
@@ -3095,7 +3093,7 @@ bool Parser::parseInitializer0x(ExpressionAST *&node, int *equals_token)
|
||||
}
|
||||
|
||||
else if (LA() == T_LPAREN) {
|
||||
return parseExpressionListParen(node);
|
||||
return parseExpressionListParen(node, false);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -3265,7 +3263,7 @@ bool Parser::parseMemInitializer(MemInitializerListAST *&node)
|
||||
ast->name = name;
|
||||
|
||||
if (LA() == T_LPAREN) {
|
||||
parseExpressionListParen(ast->expression);
|
||||
parseExpressionListParen(ast->expression, true);
|
||||
} else if (_languageFeatures.cxx11Enabled && LA() == T_LBRACE) {
|
||||
parseBracedInitList0x(ast->expression);
|
||||
} else {
|
||||
@@ -5459,7 +5457,7 @@ bool Parser::parseTypenameCallExpression(ExpressionAST *&node)
|
||||
ast->typename_token = typename_token;
|
||||
ast->name = name;
|
||||
if (LA() == T_LPAREN) {
|
||||
parseExpressionListParen(ast->expression);
|
||||
parseExpressionListParen(ast->expression, false);
|
||||
} else { // T_LBRACE
|
||||
parseBracedInitList0x(ast->expression);
|
||||
}
|
||||
@@ -5518,7 +5516,7 @@ bool Parser::parseCorePostfixExpression(ExpressionAST *&node)
|
||||
(LA() == T_LPAREN || (_languageFeatures.cxx11Enabled && LA() == T_LBRACE))) {
|
||||
ExpressionAST *expr = nullptr;
|
||||
if (LA() == T_LPAREN) {
|
||||
parseExpressionListParen(expr);
|
||||
parseExpressionListParen(expr, false);
|
||||
} else { // T_LBRACE
|
||||
parseBracedInitList0x(expr);
|
||||
}
|
||||
@@ -5714,13 +5712,14 @@ bool Parser::parseUnaryExpression(ExpressionAST *&node)
|
||||
}
|
||||
|
||||
// new-placement ::= T_LPAREN expression-list T_RPAREN
|
||||
bool Parser::parseExpressionListParen(ExpressionAST *&node)
|
||||
bool Parser::parseExpressionListParen(ExpressionAST *&node, bool allowEmpty)
|
||||
{
|
||||
DEBUG_THIS_RULE();
|
||||
if (LA() == T_LPAREN) {
|
||||
int lparen_token = consumeToken();
|
||||
ExpressionListAST *expression_list = nullptr;
|
||||
if (parseExpressionList(expression_list) && LA() == T_RPAREN) {
|
||||
const bool hasList = parseExpressionList(expression_list);
|
||||
if ((hasList || allowEmpty) && LA() == T_RPAREN) {
|
||||
int rparen_token = consumeToken();
|
||||
ExpressionListParenAST *ast = new (_pool) ExpressionListParenAST;
|
||||
ast->lparen_token = lparen_token;
|
||||
@@ -5753,7 +5752,7 @@ bool Parser::parseNewExpression(ExpressionAST *&node)
|
||||
|
||||
ExpressionAST *parenExpressionList = nullptr;
|
||||
|
||||
if (parseExpressionListParen(parenExpressionList)) {
|
||||
if (parseExpressionListParen(parenExpressionList, false)) {
|
||||
int after_new_placement = cursor();
|
||||
|
||||
NewTypeIdAST *new_type_id = nullptr;
|
||||
@@ -5846,7 +5845,7 @@ bool Parser::parseNewInitializer(ExpressionAST *&node)
|
||||
{
|
||||
DEBUG_THIS_RULE();
|
||||
if (LA() == T_LPAREN)
|
||||
return parseExpressionListParen(node);
|
||||
return parseExpressionListParen(node, true);
|
||||
else if (_languageFeatures.cxx11Enabled && LA() == T_LBRACE)
|
||||
return parseBracedInitList0x(node);
|
||||
return false;
|
||||
|
2
src/libs/3rdparty/cplusplus/Parser.h
vendored
2
src/libs/3rdparty/cplusplus/Parser.h
vendored
@@ -117,7 +117,7 @@ public:
|
||||
bool parseNamespaceAliasDefinition(DeclarationAST *&node);
|
||||
bool parseNewArrayDeclarator(NewArrayDeclaratorListAST *&node);
|
||||
bool parseNewExpression(ExpressionAST *&node);
|
||||
bool parseExpressionListParen(ExpressionAST *&node);
|
||||
bool parseExpressionListParen(ExpressionAST *&node, bool allowEmpty);
|
||||
bool parseNewInitializer(ExpressionAST *&node);
|
||||
bool parseNewTypeId(NewTypeIdAST *&node);
|
||||
bool parseOperator(OperatorAST *&node);
|
||||
|
1
src/libs/3rdparty/qtkeychain/CMakeLists.txt
vendored
1
src/libs/3rdparty/qtkeychain/CMakeLists.txt
vendored
@@ -58,7 +58,6 @@ if (UNIX AND NOT APPLE)
|
||||
DEFINES KEYCHAIN_DBUS=1
|
||||
DEPENDS Qt::DBus
|
||||
SOURCES
|
||||
gnomekeyring.cpp
|
||||
keychain_unix.cpp
|
||||
libsecret.cpp
|
||||
plaintextstore.cpp
|
||||
|
86
src/libs/3rdparty/qtkeychain/gnomekeyring.cpp
vendored
86
src/libs/3rdparty/qtkeychain/gnomekeyring.cpp
vendored
@@ -1,86 +0,0 @@
|
||||
#include "gnomekeyring_p.h"
|
||||
|
||||
const char* GnomeKeyring::GNOME_KEYRING_DEFAULT = nullptr;
|
||||
|
||||
bool GnomeKeyring::isAvailable()
|
||||
{
|
||||
const GnomeKeyring& keyring = instance();
|
||||
return keyring.isLoaded() &&
|
||||
keyring.NETWORK_PASSWORD &&
|
||||
keyring.is_available &&
|
||||
keyring.find_password &&
|
||||
keyring.store_password &&
|
||||
keyring.delete_password &&
|
||||
keyring.is_available();
|
||||
}
|
||||
|
||||
GnomeKeyring::gpointer GnomeKeyring::store_network_password(
|
||||
const gchar* keyring,
|
||||
const gchar* display_name,
|
||||
const gchar* user,
|
||||
const gchar* server,
|
||||
const gchar* type,
|
||||
const gchar* password,
|
||||
OperationDoneCallback callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data )
|
||||
{
|
||||
if ( !isAvailable() )
|
||||
return 0;
|
||||
return instance().store_password( instance().NETWORK_PASSWORD,
|
||||
keyring, display_name, password, callback,
|
||||
data, destroy_data,
|
||||
"user", user,
|
||||
"server", server,
|
||||
"type", type,
|
||||
static_cast<char*>(0) );
|
||||
}
|
||||
|
||||
GnomeKeyring::gpointer GnomeKeyring::find_network_password(
|
||||
const gchar* user, const gchar* server, const gchar* type,
|
||||
OperationGetStringCallback callback, gpointer data, GDestroyNotify destroy_data )
|
||||
{
|
||||
if ( !isAvailable() )
|
||||
return 0;
|
||||
|
||||
return instance().find_password( instance().NETWORK_PASSWORD,
|
||||
callback, data, destroy_data,
|
||||
"user", user, "server", server, "type", type,
|
||||
static_cast<char*>(0) );
|
||||
}
|
||||
|
||||
GnomeKeyring::gpointer GnomeKeyring::delete_network_password( const gchar* user,
|
||||
const gchar* server,
|
||||
OperationDoneCallback callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data )
|
||||
{
|
||||
if ( !isAvailable() )
|
||||
return 0;
|
||||
return instance().delete_password( instance().NETWORK_PASSWORD,
|
||||
callback, data, destroy_data,
|
||||
"user", user, "server", server, static_cast<char*>(0) );
|
||||
}
|
||||
|
||||
GnomeKeyring::GnomeKeyring()
|
||||
: QLibrary(QLatin1String("gnome-keyring"), 0)
|
||||
{
|
||||
static const PasswordSchema schema = {
|
||||
ITEM_NETWORK_PASSWORD,
|
||||
{{ "user", ATTRIBUTE_TYPE_STRING },
|
||||
{ "server", ATTRIBUTE_TYPE_STRING },
|
||||
{ "type", ATTRIBUTE_TYPE_STRING },
|
||||
{ 0, static_cast<AttributeType>( 0 ) }}
|
||||
};
|
||||
|
||||
NETWORK_PASSWORD = &schema;
|
||||
is_available = reinterpret_cast<is_available_fn*>( resolve( "gnome_keyring_is_available" ) );
|
||||
find_password = reinterpret_cast<find_password_fn*>( resolve( "gnome_keyring_find_password" ) );
|
||||
store_password = reinterpret_cast<store_password_fn*>( resolve( "gnome_keyring_store_password" ) );
|
||||
delete_password = reinterpret_cast<delete_password_fn*>( resolve( "gnome_keyring_delete_password" ) );
|
||||
}
|
||||
|
||||
GnomeKeyring& GnomeKeyring::instance() {
|
||||
static GnomeKeyring keyring;
|
||||
return keyring;
|
||||
}
|
94
src/libs/3rdparty/qtkeychain/gnomekeyring_p.h
vendored
94
src/libs/3rdparty/qtkeychain/gnomekeyring_p.h
vendored
@@ -1,94 +0,0 @@
|
||||
#ifndef QTKEYCHAIN_GNOME_P_H
|
||||
#define QTKEYCHAIN_GNOME_P_H
|
||||
|
||||
#include <QLibrary>
|
||||
|
||||
class GnomeKeyring : private QLibrary {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Result {
|
||||
RESULT_OK,
|
||||
RESULT_DENIED,
|
||||
RESULT_NO_KEYRING_DAEMON,
|
||||
RESULT_ALREADY_UNLOCKED,
|
||||
RESULT_NO_SUCH_KEYRING,
|
||||
RESULT_BAD_ARGUMENTS,
|
||||
RESULT_IO_ERROR,
|
||||
RESULT_CANCELLED,
|
||||
RESULT_KEYRING_ALREADY_EXISTS,
|
||||
RESULT_NO_MATCH
|
||||
};
|
||||
|
||||
enum ItemType {
|
||||
ITEM_GENERIC_SECRET = 0,
|
||||
ITEM_NETWORK_PASSWORD,
|
||||
ITEM_NOTE,
|
||||
ITEM_CHAINED_KEYRING_PASSWORD,
|
||||
ITEM_ENCRYPTION_KEY_PASSWORD,
|
||||
ITEM_PK_STORAGE = 0x100
|
||||
};
|
||||
|
||||
enum AttributeType {
|
||||
ATTRIBUTE_TYPE_STRING,
|
||||
ATTRIBUTE_TYPE_UINT32
|
||||
};
|
||||
|
||||
typedef char gchar;
|
||||
typedef void* gpointer;
|
||||
typedef bool gboolean;
|
||||
typedef struct {
|
||||
ItemType item_type;
|
||||
struct {
|
||||
const gchar* name;
|
||||
AttributeType type;
|
||||
} attributes[32];
|
||||
} PasswordSchema;
|
||||
|
||||
typedef void ( *OperationGetStringCallback )( Result result, bool binary,
|
||||
const char* string, gpointer data );
|
||||
typedef void ( *OperationDoneCallback )( Result result, gpointer data );
|
||||
typedef void ( *GDestroyNotify )( gpointer data );
|
||||
|
||||
static const char* GNOME_KEYRING_DEFAULT;
|
||||
|
||||
static bool isAvailable();
|
||||
|
||||
static gpointer store_network_password( const gchar* keyring, const gchar* display_name,
|
||||
const gchar* user, const gchar* server,
|
||||
const gchar* type, const gchar* password,
|
||||
OperationDoneCallback callback, gpointer data, GDestroyNotify destroy_data );
|
||||
|
||||
static gpointer find_network_password( const gchar* user, const gchar* server,
|
||||
const gchar* type,
|
||||
OperationGetStringCallback callback,
|
||||
gpointer data, GDestroyNotify destroy_data );
|
||||
|
||||
static gpointer delete_network_password( const gchar* user, const gchar* server,
|
||||
OperationDoneCallback callback, gpointer data, GDestroyNotify destroy_data );
|
||||
private:
|
||||
GnomeKeyring();
|
||||
|
||||
static GnomeKeyring& instance();
|
||||
|
||||
const PasswordSchema* NETWORK_PASSWORD;
|
||||
typedef gboolean ( is_available_fn )( void );
|
||||
typedef gpointer ( store_password_fn )( const PasswordSchema* schema, const gchar* keyring,
|
||||
const gchar* display_name, const gchar* password,
|
||||
OperationDoneCallback callback, gpointer data, GDestroyNotify destroy_data,
|
||||
... );
|
||||
typedef gpointer ( find_password_fn )( const PasswordSchema* schema,
|
||||
OperationGetStringCallback callback, gpointer data, GDestroyNotify destroy_data,
|
||||
... );
|
||||
typedef gpointer ( delete_password_fn )( const PasswordSchema* schema,
|
||||
OperationDoneCallback callback, gpointer data, GDestroyNotify destroy_data,
|
||||
... );
|
||||
|
||||
is_available_fn* is_available;
|
||||
find_password_fn* find_password;
|
||||
store_password_fn* store_password;
|
||||
delete_password_fn* delete_password;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
125
src/libs/3rdparty/qtkeychain/keychain_unix.cpp
vendored
125
src/libs/3rdparty/qtkeychain/keychain_unix.cpp
vendored
@@ -7,7 +7,6 @@
|
||||
* details, check the accompanying file 'COPYING'. *
|
||||
*****************************************************************************/
|
||||
#include "keychain_p.h"
|
||||
#include "gnomekeyring_p.h"
|
||||
#include "libsecret_p.h"
|
||||
#include "plaintextstore_p.h"
|
||||
|
||||
@@ -17,7 +16,6 @@ using namespace QKeychain;
|
||||
|
||||
enum KeyringBackend {
|
||||
Backend_LibSecretKeyring,
|
||||
Backend_GnomeKeyring,
|
||||
Backend_Kwallet4,
|
||||
Backend_Kwallet5,
|
||||
Backend_Kwallet6,
|
||||
@@ -135,9 +133,6 @@ static KeyringBackend detectKeyringBackend()
|
||||
if (LibSecretKeyring::isAvailable()) {
|
||||
return Backend_LibSecretKeyring;
|
||||
}
|
||||
if (GnomeKeyring::isAvailable()) {
|
||||
return Backend_GnomeKeyring;
|
||||
}
|
||||
// During startup the keychain backend might just not have started yet
|
||||
return Backend_Kwallet5;
|
||||
|
||||
@@ -148,9 +143,6 @@ static KeyringBackend detectKeyringBackend()
|
||||
if (LibSecretKeyring::isAvailable()) {
|
||||
return Backend_LibSecretKeyring;
|
||||
}
|
||||
if (GnomeKeyring::isAvailable()) {
|
||||
return Backend_GnomeKeyring;
|
||||
}
|
||||
// During startup the keychain backend might just not have started yet
|
||||
return Backend_Kwallet6;
|
||||
|
||||
@@ -162,9 +154,6 @@ static KeyringBackend detectKeyringBackend()
|
||||
if (LibSecretKeyring::isAvailable()) {
|
||||
return Backend_LibSecretKeyring;
|
||||
}
|
||||
if (GnomeKeyring::isAvailable()) {
|
||||
return Backend_GnomeKeyring;
|
||||
}
|
||||
if (isKwalletAvailable(KWALLET6_DBUS_IFACE, KWALLET6_DBUS_PATH)) {
|
||||
return Backend_Kwallet6;
|
||||
}
|
||||
@@ -180,7 +169,7 @@ static KeyringBackend detectKeyringBackend()
|
||||
//
|
||||
// In the future there should be a difference between "API available" and
|
||||
// "keychain available".
|
||||
return Backend_GnomeKeyring;
|
||||
return Backend_LibSecretKeyring;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -214,16 +203,6 @@ void ReadPasswordJobPrivate::scheduledStart() {
|
||||
q->emitFinishedWithError( OtherError, tr("Unknown error") );
|
||||
}
|
||||
} break;
|
||||
case Backend_GnomeKeyring:
|
||||
this->mode = JobPrivate::Text;
|
||||
if ( !GnomeKeyring::find_network_password( key.toUtf8().constData(),
|
||||
q->service().toUtf8().constData(),
|
||||
"plaintext",
|
||||
reinterpret_cast<GnomeKeyring::OperationGetStringCallback>( &JobPrivate::gnomeKeyring_readCb ),
|
||||
this, 0 ) )
|
||||
q->emitFinishedWithError( OtherError, tr("Unknown error") );
|
||||
break;
|
||||
|
||||
case Backend_Kwallet4:
|
||||
kwalletReadPasswordScheduledStartImpl(KWALLET4_DBUS_IFACE, KWALLET4_DBUS_PATH, this);
|
||||
break;
|
||||
@@ -246,59 +225,6 @@ void JobPrivate::kwalletWalletFound(QDBusPendingCallWatcher *watcher)
|
||||
this, SLOT(kwalletOpenFinished(QDBusPendingCallWatcher*)) );
|
||||
}
|
||||
|
||||
static QPair<Error, QString> mapGnomeKeyringError( int result )
|
||||
{
|
||||
Q_ASSERT( result != GnomeKeyring::RESULT_OK );
|
||||
|
||||
switch ( result ) {
|
||||
case GnomeKeyring::RESULT_DENIED:
|
||||
return qMakePair( AccessDenied, QObject::tr("Access to keychain denied") );
|
||||
case GnomeKeyring::RESULT_NO_KEYRING_DAEMON:
|
||||
return qMakePair( NoBackendAvailable, QObject::tr("No keyring daemon") );
|
||||
case GnomeKeyring::RESULT_ALREADY_UNLOCKED:
|
||||
return qMakePair( OtherError, QObject::tr("Already unlocked") );
|
||||
case GnomeKeyring::RESULT_NO_SUCH_KEYRING:
|
||||
return qMakePair( OtherError, QObject::tr("No such keyring") );
|
||||
case GnomeKeyring::RESULT_BAD_ARGUMENTS:
|
||||
return qMakePair( OtherError, QObject::tr("Bad arguments") );
|
||||
case GnomeKeyring::RESULT_IO_ERROR:
|
||||
return qMakePair( OtherError, QObject::tr("I/O error") );
|
||||
case GnomeKeyring::RESULT_CANCELLED:
|
||||
return qMakePair( OtherError, QObject::tr("Cancelled") );
|
||||
case GnomeKeyring::RESULT_KEYRING_ALREADY_EXISTS:
|
||||
return qMakePair( OtherError, QObject::tr("Keyring already exists") );
|
||||
case GnomeKeyring::RESULT_NO_MATCH:
|
||||
return qMakePair( EntryNotFound, QObject::tr("No match") );
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return qMakePair( OtherError, QObject::tr("Unknown error") );
|
||||
}
|
||||
|
||||
void JobPrivate::gnomeKeyring_readCb( int result, const char* string, JobPrivate* self )
|
||||
{
|
||||
if ( result == GnomeKeyring::RESULT_OK ) {
|
||||
if (self->mode == JobPrivate::Text)
|
||||
self->data = QByteArray(string);
|
||||
else
|
||||
self->data = QByteArray::fromBase64(string);
|
||||
|
||||
self->q->emitFinished();
|
||||
} else if (self->mode == JobPrivate::Text) {
|
||||
self->mode = JobPrivate::Binary;
|
||||
if ( !GnomeKeyring::find_network_password( self->key.toUtf8().constData(),
|
||||
self->q->service().toUtf8().constData(),
|
||||
"base64",
|
||||
reinterpret_cast<GnomeKeyring::OperationGetStringCallback>( &JobPrivate::gnomeKeyring_readCb ),
|
||||
self, 0 ) )
|
||||
self->q->emitFinishedWithError( OtherError, tr("Unknown error") );
|
||||
} else {
|
||||
const QPair<Error, QString> errorResult = mapGnomeKeyringError( result );
|
||||
self->q->emitFinishedWithError( errorResult.first, errorResult.second );
|
||||
}
|
||||
}
|
||||
|
||||
void ReadPasswordJobPrivate::fallbackOnError(const QDBusError& err )
|
||||
{
|
||||
PlainTextStore plainTextStore( q->service(), q->settings() );
|
||||
@@ -455,34 +381,6 @@ void WritePasswordJobPrivate::scheduledStart() {
|
||||
q->emitFinishedWithError( OtherError, tr("Unknown error") );
|
||||
}
|
||||
} break;
|
||||
case Backend_GnomeKeyring: {
|
||||
QString type;
|
||||
QByteArray password;
|
||||
|
||||
switch(mode) {
|
||||
case JobPrivate::Text:
|
||||
type = QLatin1String("plaintext");
|
||||
password = data;
|
||||
break;
|
||||
default:
|
||||
type = QLatin1String("base64");
|
||||
password = data.toBase64();
|
||||
break;
|
||||
}
|
||||
|
||||
QByteArray service = q->service().toUtf8();
|
||||
if ( !GnomeKeyring::store_network_password( GnomeKeyring::GNOME_KEYRING_DEFAULT,
|
||||
service.constData(),
|
||||
key.toUtf8().constData(),
|
||||
service.constData(),
|
||||
type.toUtf8().constData(),
|
||||
password.constData(),
|
||||
reinterpret_cast<GnomeKeyring::OperationDoneCallback>( &JobPrivate::gnomeKeyring_writeCb ),
|
||||
this, 0 ) )
|
||||
q->emitFinishedWithError( OtherError, tr("Unknown error") );
|
||||
}
|
||||
break;
|
||||
|
||||
case Backend_Kwallet4:
|
||||
kwalletWritePasswordScheduledStart(KWALLET4_DBUS_IFACE, KWALLET4_DBUS_PATH, this);
|
||||
break;
|
||||
@@ -511,16 +409,6 @@ void WritePasswordJobPrivate::fallbackOnError(const QDBusError &err)
|
||||
q->emitFinished();
|
||||
}
|
||||
|
||||
void JobPrivate::gnomeKeyring_writeCb(int result, JobPrivate* self )
|
||||
{
|
||||
if ( result == GnomeKeyring::RESULT_OK ) {
|
||||
self->q->emitFinished();
|
||||
} else {
|
||||
const QPair<Error, QString> errorResult = mapGnomeKeyringError( result );
|
||||
self->q->emitFinishedWithError( errorResult.first, errorResult.second );
|
||||
}
|
||||
}
|
||||
|
||||
void JobPrivate::kwalletOpenFinished( QDBusPendingCallWatcher* watcher ) {
|
||||
watcher->deleteLater();
|
||||
QDBusPendingReply<int> reply = *watcher;
|
||||
@@ -585,15 +473,6 @@ void DeletePasswordJobPrivate::scheduledStart() {
|
||||
q->emitFinishedWithError( OtherError, tr("Unknown error") );
|
||||
}
|
||||
} break;
|
||||
case Backend_GnomeKeyring: {
|
||||
if ( !GnomeKeyring::delete_network_password(
|
||||
key.toUtf8().constData(), q->service().toUtf8().constData(),
|
||||
reinterpret_cast<GnomeKeyring::OperationDoneCallback>( &JobPrivate::gnomeKeyring_writeCb ),
|
||||
this, 0 ) )
|
||||
q->emitFinishedWithError( OtherError, tr("Unknown error") );
|
||||
}
|
||||
break;
|
||||
|
||||
case Backend_Kwallet4:
|
||||
kwalletWritePasswordScheduledStart(KWALLET4_DBUS_IFACE, KWALLET4_DBUS_PATH, this);
|
||||
break;
|
||||
@@ -627,7 +506,7 @@ void DeletePasswordJobPrivate::fallbackOnError(const QDBusError &err) {
|
||||
|
||||
bool QKeychain::isAvailable()
|
||||
{
|
||||
return LibSecretKeyring::isAvailable() || GnomeKeyring::isAvailable()
|
||||
return LibSecretKeyring::isAvailable()
|
||||
|| isKwalletAvailable(KWALLET6_DBUS_IFACE, KWALLET6_DBUS_PATH)
|
||||
|| isKwalletAvailable(KWALLET5_DBUS_IFACE, KWALLET5_DBUS_PATH);
|
||||
}
|
||||
|
2
src/libs/3rdparty/qtkeychain/qtkeychain.qbs
vendored
2
src/libs/3rdparty/qtkeychain/qtkeychain.qbs
vendored
@@ -74,8 +74,6 @@ QtcLibrary {
|
||||
cpp.defines: outer.concat(["KEYCHAIN_DBUS=1"])
|
||||
cpp.cxxFlags: outer.concat("-Wno-cast-function-type")
|
||||
files: [
|
||||
"gnomekeyring.cpp",
|
||||
"gnomekeyring_p.h",
|
||||
"keychain_unix.cpp",
|
||||
"libsecret.cpp",
|
||||
"libsecret_p.h",
|
||||
|
@@ -1886,7 +1886,7 @@ void GetterSetterRefactoringHelper::performGeneration(ExistingGetterSetterData d
|
||||
|
||||
FullySpecifiedType memberVariableType = data.declarationSymbol->type();
|
||||
memberVariableType.setConst(false);
|
||||
const bool isMemberVariableStatic = memberVariableType.isStatic();
|
||||
const bool isMemberVariableStatic = data.declarationSymbol->isStatic();
|
||||
memberVariableType.setStatic(false);
|
||||
Overview overview = CppCodeStyleSettings::currentProjectCodeStyleOverview();
|
||||
overview.showTemplateParameters = false;
|
||||
|
@@ -18,7 +18,7 @@ namespace ProjectExplorer {
|
||||
|
||||
QString FileTransferSetupData::defaultRsyncFlags()
|
||||
{
|
||||
return "-av";
|
||||
return "-rltv";
|
||||
}
|
||||
|
||||
static IDeviceConstPtr matchedDevice(const FilesToTransfer &files)
|
||||
|
@@ -108,7 +108,14 @@ void JsonSummaryPage::initializePage()
|
||||
connect(m_wizard, &JsonWizard::filesReady, this, &JsonSummaryPage::triggerCommit);
|
||||
connect(m_wizard, &JsonWizard::filesReady, this, &JsonSummaryPage::addToProject);
|
||||
|
||||
// set result to accepted, so we can check if updateFileList -> m_wizard->generateFileList
|
||||
// called reject()
|
||||
m_wizard->setResult(QDialog::Accepted);
|
||||
updateFileList();
|
||||
// if there were errors while updating the file list, the dialog is rejected
|
||||
// so don't continue the setup (which also avoids showing the error message again)
|
||||
if (m_wizard->result() == QDialog::Rejected)
|
||||
return;
|
||||
|
||||
IWizardFactory::WizardKind kind = wizardKind(m_wizard);
|
||||
bool isProject = (kind == IWizardFactory::ProjectWizard);
|
||||
|
@@ -238,13 +238,17 @@ Core::GeneratedFiles JsonWizardFileGenerator::fileList(MacroExpander *expander,
|
||||
}
|
||||
|
||||
const Core::GeneratedFiles result
|
||||
= Utils::transform(fileList,
|
||||
[this, &expander, &errorMessage](const File &f) {
|
||||
return generateFile(f, expander, errorMessage);
|
||||
= Utils::transform(fileList, [this, &expander, &errorMessage](const File &f) {
|
||||
QString generateError;
|
||||
const Core::GeneratedFile file = generateFile(f, expander, &generateError);
|
||||
if (!generateError.isEmpty())
|
||||
*errorMessage = generateError;
|
||||
return file;
|
||||
});
|
||||
|
||||
if (Utils::contains(result,
|
||||
[](const Core::GeneratedFile &gf) { return gf.filePath().isEmpty(); }))
|
||||
if (Utils::contains(result, [](const Core::GeneratedFile &gf) {
|
||||
return gf.filePath().isEmpty();
|
||||
}))
|
||||
return Core::GeneratedFiles();
|
||||
|
||||
return result;
|
||||
|
@@ -112,6 +112,8 @@ private slots:
|
||||
void templated_dtor_3();
|
||||
void templated_dtor_4();
|
||||
void templated_dtor_5();
|
||||
void emptyMemberInitialization();
|
||||
void placementNewWithEmptyConstructorArgs();
|
||||
|
||||
// possible declaration-or-expression statements
|
||||
void call_call_1();
|
||||
@@ -2061,6 +2063,23 @@ void tst_AST::invalidFunctionInitializer()
|
||||
QVERIFY(diag.errorCount != 0);
|
||||
}
|
||||
|
||||
void tst_AST::emptyMemberInitialization()
|
||||
{
|
||||
const std::shared_ptr<TranslationUnit> unit(parse(
|
||||
"struct S\n{\n S(): i() {}\n int i;};", TranslationUnit::ParseTranlationUnit));
|
||||
QVERIFY(unit->ast());
|
||||
QCOMPARE(diag.errorCount, 0);
|
||||
}
|
||||
|
||||
void tst_AST::placementNewWithEmptyConstructorArgs()
|
||||
{
|
||||
const std::shared_ptr<TranslationUnit> unit(parse(
|
||||
"int main()\n{ int* i = new int;\n i = new(i) int();}",
|
||||
TranslationUnit::ParseTranlationUnit));
|
||||
QVERIFY(unit->ast());
|
||||
QCOMPARE(diag.errorCount, 0);
|
||||
}
|
||||
|
||||
void tst_AST::initTestCase()
|
||||
{
|
||||
control.setDiagnosticClient(&diag);
|
||||
|
Reference in New Issue
Block a user