diff --git a/config.tests/unix/c++11/c++11.cpp b/config.tests/unix/c++11/c++11.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d541144bf96fbbf143e2d01d907ecd9b8b492eef
--- /dev/null
+++ b/config.tests/unix/c++11/c++11.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+// Compiler claims to support C++11, trust it
+#else
+#  error "__cplusplus must be >= 201103L"
+#endif
+
+int main(int, char **) { return 0; }
diff --git a/config.tests/unix/c++11/c++11.pro b/config.tests/unix/c++11/c++11.pro
new file mode 100644
index 0000000000000000000000000000000000000000..dd4042b8d6f6a8251786a3611986952a128c00b1
--- /dev/null
+++ b/config.tests/unix/c++11/c++11.pro
@@ -0,0 +1,3 @@
+SOURCES = c++11.cpp
+CONFIG += c++11
+CONFIG -= qt app_bundle
diff --git a/configure b/configure
index 747ebf3b20106565ff3c66276e43909eb9fafab7..d605fe07e2e2d9087065f120369acbfb7b5a43ab 100755
--- a/configure
+++ b/configure
@@ -802,6 +802,7 @@ CFG_ICU=auto
 CFG_FORCE_ASSERTS=no
 CFG_PCRE=auto
 QPA_PLATFORM_GUARD=yes
+CFG_CXX11=auto
 
 # initalize variables used for installation
 QT_INSTALL_PREFIX=
@@ -918,7 +919,7 @@ while [ "$#" -gt 0 ]; do
         VAL=no
         ;;
     #Qt style yes options
-    -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-directfb|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-qml-debug|-javascript-jit|-rpath|-pkg-config|-force-pkg-config|-icu|-force-asserts|-testcocoon)
+    -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-directfb|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-qml-debug|-javascript-jit|-rpath|-pkg-config|-force-pkg-config|-icu|-force-asserts|-testcocoon|-c++11)
         VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
         VAL=yes
         ;;
@@ -1986,6 +1987,13 @@ while [ "$#" -gt 0 ]; do
             UNKNOWN_OPT=yes
         fi
         ;;
+    c++11)
+        if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+            CFG_CXX11="$VAL"
+        else
+            UNKNOWN_OPT=yes
+        fi
+        ;;
     *)
         UNKNOWN_OPT=yes
         ;;
@@ -2871,7 +2879,7 @@ if [ "$OPT_HELP" = "yes" ]; then
 Usage:  $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
         [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
         [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
-        [-release] [-debug] [-debug-and-release]
+        [-release] [-debug] [-debug-and-release] [-c++11] [-no-c++11]
         [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
         [-largefile] [-no-accessibility] [-accessibility] [-no-sql-<driver>] [-sql-<driver>]
         [-plugin-sql-<driver>] [-system-sqlite]
@@ -2961,6 +2969,8 @@ Configure options:
     -opensource ........ Compile and link the Open-Source Edition of Qt.
     -commercial ........ Compile and link the Commercial Edition of Qt.
 
+    -no-c++11 .......... Do not compile Qt with C++11 support enabled.
+ +  -c++11 ............. Compile Qt with C++11 support enabled.
 
  *  -shared ............ Create and use shared Qt libraries.
     -static ............ Create and use static Qt libraries.
@@ -3728,6 +3738,21 @@ fi
 # functionality tests
 #-------------------------------------------------------------------------------
 
+# Detect C++11 support
+if [ "$CFG_CXX11" != "no" ]; then
+    if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/c++11 "C++11" $L_FLAGS $I_FLAGS $l_FLAGS; then
+        CFG_CXX11="yes"
+    elif [ "$CFG_CXX11" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+        echo "C++11 support cannot be enabled due to functionality tests!"
+        echo " Turn on verbose messaging (-v) to $0 to see the final report."
+        echo " If you believe this message is in error you may use the continue"
+        echo " switch (-continue) to $0 to continue."
+        exit 101
+    else
+        CFG_CXX11="no"
+    fi
+fi
+
 # detect availability of float math.h functions
 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
     CFG_USE_FLOATMATH=yes
@@ -5006,6 +5031,8 @@ fi
 # ask for all that hasn't been auto-detected or specified in the arguments
 #-------------------------------------------------------------------------------
 
+[ "$CFG_CXX11" = "yes" ] && QT_CONFIG="$QT_CONFIG c++11"
+
 # ### Vestige
 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
     QT_CONFIG="$QT_CONFIG phonon-backend"
@@ -5938,6 +5965,7 @@ if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
 else
    echo "Debug .................. $CFG_DEBUG"
 fi
+echo "C++11 support .......... $CFG_CXX11"
 if [ -n "$PKG_CONFIG" ]; then
     echo "pkg-config ............. yes"
 else
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0
index 7b1395282636b632ea41ab852ba65f4a2f266b3a..1775a4c556c486f6fafa960c0cf132402c412de2 100644
--- a/dist/changes-5.0.0
+++ b/dist/changes-5.0.0
@@ -287,6 +287,12 @@ General Improvements
   more closely match the directory structure of the code under test.
   Integration tests have been moved to tests/auto/integrationtests.
 
+- Qt is compiled with C++11 support enabled by default, provided the compiler
+  supports C++11. Qmake based projects can enable C++11 support explicitly
+  using 'CONFIG+=c++11' in their .pro files. To enable it conditionally, use
+  'contains(QT_CONFIG,c++11):CONFIG+=c++11'. This will enable C++11 support
+  only if Qt was built with C++11 support.
+
 Third party components
 ----------------------
 
diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf
index 069cdfafecf13c5fef1683f4239df71b9f7a2905..67fdf4c1f434ca8e47024c2dbf597296644f6424 100644
--- a/mkspecs/common/clang.conf
+++ b/mkspecs/common/clang.conf
@@ -15,3 +15,6 @@ QMAKE_CFLAGS_PRECOMPILE          = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_
 QMAKE_CFLAGS_USE_PRECOMPILE      = -Xclang -include-pch -Xclang ${QMAKE_PCH_OUTPUT}
 QMAKE_CXXFLAGS_PRECOMPILE        = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
 QMAKE_CXXFLAGS_USE_PRECOMPILE    = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+QMAKE_CXXFLAGS_CXX11 = -std=c++11
+QMAKE_LFLAGS_CXX11   =
diff --git a/mkspecs/common/g++-base.conf b/mkspecs/common/g++-base.conf
index eb5b7d618885490318d2bfe5e5f2e5ba44a4f360..35f86e5bf157d6bec611096d1a72e00fd53dbbdb 100644
--- a/mkspecs/common/g++-base.conf
+++ b/mkspecs/common/g++-base.conf
@@ -28,3 +28,6 @@ QMAKE_CFLAGS_PRECOMPILE       = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH
 QMAKE_CFLAGS_USE_PRECOMPILE   = -include ${QMAKE_PCH_OUTPUT_BASE}
 QMAKE_CXXFLAGS_PRECOMPILE     = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
 QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+QMAKE_CXXFLAGS_CXX11 = -std=c++0x
+QMAKE_LFLAGS_CXX11   =
diff --git a/mkspecs/features/c++11.prf b/mkspecs/features/c++11.prf
new file mode 100644
index 0000000000000000000000000000000000000000..4b56fa9fd24f1eef80c01503b38baa2f2646e99b
--- /dev/null
+++ b/mkspecs/features/c++11.prf
@@ -0,0 +1,3 @@
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_CXX11
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CXXFLAGS_CXX11
+QMAKE_LFLAGS += $$QMAKE_LFLAGS_CXX11
diff --git a/mkspecs/features/qt_module_config.prf b/mkspecs/features/qt_module_config.prf
index 217572e143276937c1c1d19663ef01e88ee13672..b6b0c2ca372ef30a474f9fcfea4175cbd3bd025c 100644
--- a/mkspecs/features/qt_module_config.prf
+++ b/mkspecs/features/qt_module_config.prf
@@ -50,6 +50,7 @@ contains(QT_CONFIG, largefile):CONFIG += largefile
 contains(QT_CONFIG, build_all):CONFIG += build_all
 contains(QT_CONFIG, separate_debug_info):CONFIG += separate_debug_info
 contains(QT_CONFIG, separate_debug_info_nocopy):CONFIG += separate_debug_info_nocopy
+contains(QT_CONFIG, c++11):CONFIG += c++11
 
 #mac frameworks
 mac:!static:contains(QT_CONFIG, qt_framework) {
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
index a63ffab8685a9b97e96da3c9932027baf7996794..768918f65b9886955dcdb75dd604b158e5fb6228 100644
--- a/mkspecs/features/qt_plugin.prf
+++ b/mkspecs/features/qt_plugin.prf
@@ -11,6 +11,7 @@ TARGET = $$qtLibraryTarget($$TARGET)
 contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
 contains(QT_CONFIG, separate_debug_info):CONFIG += separate_debug_info
 contains(QT_CONFIG, separate_debug_info_nocopy):CONFIG += separate_debug_info_nocopy
+contains(QT_CONFIG, c++11):CONFIG += c++11
 
 load(qt_targets)
 
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index 4884ea1d1f8f86f39bd4879c0ca2801035f2efe7..eb837254e19ca90d5550c262a24a0aa66412e721 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -35,6 +35,7 @@ QMAKE_CXXFLAGS_SHLIB	= $$QMAKE_CFLAGS_SHLIB
 QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
 QMAKE_CXXFLAGS_YACC	= $$QMAKE_CFLAGS_YACC
 QMAKE_CXXFLAGS_THREAD	= $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_CXX11    = -std=c++0x
 
 QMAKE_INCDIR		=
 QMAKE_LIBDIR		=
@@ -56,6 +57,7 @@ QMAKE_LFLAGS_SONAME	= -Wl,-soname,
 QMAKE_LFLAGS_THREAD	=
 QMAKE_LFLAGS_NOUNDEF	= -Wl,-z,defs
 QMAKE_LFLAGS_RPATH	= -Wl,-rpath,
+QMAKE_LFLAGS_CXX11      =
 
 QMAKE_LIBS		=
 QMAKE_LIBS_DYNLOAD	= -ldl