diff --git a/dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectnode.cpp b/dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectnode.cpp index a23f37ebc..ab685b573 100644 --- a/dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectnode.cpp +++ b/dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectnode.cpp @@ -420,7 +420,9 @@ ProjectExplorer::FolderNode *SnapcraftGenericPartNode::createOrFindFolder(const watches << currentPath.toFileInfo().absoluteFilePath(); } - m_watcher->addPaths(watches); + if (!watches.isEmpty()) + m_watcher->addPaths(watches); + return currFolder; } diff --git a/dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuplugin.cpp b/dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuplugin.cpp index fe24484d3..f366d2768 100644 --- a/dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuplugin.cpp +++ b/dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuplugin.cpp @@ -91,6 +91,8 @@ #include #include +#include +#include using namespace Ubuntu; @@ -123,6 +125,11 @@ bool UbuntuPlugin::initialize(const QStringList &arguments, QString *errorString defaultFont.setFamily(QStringLiteral("Ubuntu")); defaultFont.setWeight(QFont::Light); + + if (::getuid() == 0) { + criticalError(tr("\nThe Ubuntu SDK can not be used as superuser.")); + return false; + } if (QStandardPaths::findExecutable(QStringLiteral("lxc")).isEmpty()) { criticalError(tr("\nLxd is not installed properly.\nIt is required for the Ubuntu-SDK-IDE to work.")); return false; @@ -419,7 +426,7 @@ bool UbuntuPlugin::checkContainerSetup() case ERR_NO_ACCESS: //the tool tells us that we have no access to the LXD server criticalError(tr("The current user can not access the LXD server which is required for the Ubuntu SDK.\n" - "Make sure the user is part of the lxd group and restart the IDE.")); + "Make sure the user is part of the lxd group, relogin and restart the IDE.")); break; case ERR_NO_BRIDGE: if (Settings::askForContainerSetup()) {