diff --git a/.waf-tools/cryptopp.py b/.waf-tools/cryptopp.py
deleted file mode 100644
index b61c0bf..0000000
--- a/.waf-tools/cryptopp.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-
-'''
-
-When using this tool, the wscript will look like:
-
-	def options(opt):
-	        opt.tool_options('cryptopp', tooldir=["waf-tools"])
-
-	def configure(conf):
-		conf.load('compiler_cxx cryptopp')
-
-	def build(bld):
-		bld(source='main.cpp', target='app', use='CRYPTOPP')
-
-Options are generated, in order to specify the location of cryptopp includes/libraries.
-
-
-'''
-import sys
-import re
-from waflib import Utils,Logs,Errors
-from waflib.Configure import conf
-CRYPTOPP_DIR=['/usr','/usr/local','/opt/local','/sw']
-CRYPTOPP_VERSION_FILE='config.h'
-CRYPTOPP_VERSION_CODE='''
-#include <iostream>
-#include <cryptopp/config.h>
-int main() { std::cout << CRYPTOPP_VERSION; }
-'''
-
-def options(opt):
-	opt.add_option('--cryptopp',type='string',default='',dest='cryptopp_dir',help='''path to where cryptopp is installed, e.g. /opt/local''')
-@conf
-def __cryptopp_get_version_file(self,dir):
-	try:
-		return self.root.find_dir(dir).find_node('%s/%s' % ('include/cryptopp', CRYPTOPP_VERSION_FILE))
-	except:
-		return None
-@conf
-def cryptopp_get_version(self,dir):
-	val=self.check_cxx(fragment=CRYPTOPP_VERSION_CODE,includes=['%s/%s' % (dir, 'include')], execute=True, define_ret = True, mandatory=True)
-	return val
-@conf
-def cryptopp_get_root(self,*k,**kw):
-	root=k and k[0]or kw.get('path',None)
-	# Logs.pprint ('RED', '   %s' %root)
-	if root and self.__cryptopp_get_version_file(root):
-		return root
-	for dir in CRYPTOPP_DIR:
-		if self.__cryptopp_get_version_file(dir):
-			return dir
-	if root:
-		self.fatal('CryptoPP not found in %s'%root)
-	else:
-		self.fatal('CryptoPP not found, please provide a --cryptopp argument (see help)')
-@conf
-def check_cryptopp(self,*k,**kw):
-	if not self.env['CXX']:
-		self.fatal('load a c++ compiler first, conf.load("compiler_cxx")')
-
-	var=kw.get('uselib_store','CRYPTOPP')
-	self.start_msg('Checking CRYPTOPP')
-	root = self.cryptopp_get_root(*k,**kw)
-	self.env.CRYPTOPP_VERSION=self.cryptopp_get_version(root)
-
-	self.env['INCLUDES_%s'%var]= '%s/%s' % (root, "include")
-	self.env['LIB_%s'%var] = "cryptopp"
-	self.env['LIBPATH_%s'%var] = '%s/%s' % (root, "lib")
-
-	self.end_msg(self.env.CRYPTOPP_VERSION)
-	if Logs.verbose:
-		Logs.pprint('CYAN','	CRYPTOPP include : %s'%self.env['INCLUDES_%s'%var])
-		Logs.pprint('CYAN','	CRYPTOPP lib     : %s'%self.env['LIB_%s'%var])
-		Logs.pprint('CYAN','	CRYPTOPP libpath : %s'%self.env['LIBPATH_%s'%var])
-
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 7a317b1..d3246e1 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -151,12 +151,12 @@
                               '-Wextra',
                               '-Werror',
                               '-Wcatch-value=2',
-                              # '-Wextra-semi', # prevent noisy output with Qt5
+                              #'-Wextra-semi', # Qt5
                               '-Wnon-virtual-dtor',
                               '-Wno-error=deprecated-declarations', # Bug #3795
                               '-Wno-error=maybe-uninitialized', # Bug #1615
+                              '-Wno-deprecated-copy', # Qt5
                               '-Wno-unused-parameter',
-                              '-Wno-error=deprecated-copy', # Qt5
                               ]
         flags['LINKFLAGS'] += ['-Wl,-O1']
         return flags
@@ -169,8 +169,9 @@
                               '-Wall',
                               '-Wextra',
                               '-Wcatch-value=2',
-                              '-Wextra-semi',
+                              #'-Wextra-semi', # Qt5
                               '-Wnon-virtual-dtor',
+                              '-Wno-deprecated-copy', # Qt5
                               '-Wno-unused-parameter',
                               ]
         flags['LINKFLAGS'] += ['-Wl,-O1']
@@ -180,7 +181,7 @@
     def getDebugFlags(self, conf):
         flags = super(GccFlags, self).getDebugFlags(conf)
         flags['CXXFLAGS'] += ['-fdiagnostics-color',
-                              '-Wredundant-tags',
+                              #'-Wredundant-tags', # Qt5
                               ]
         if platform.machine() == 'armv7l' and self.getCompilerVersion(conf) >= (7, 1, 0):
             flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106
@@ -189,7 +190,7 @@
     def getOptimizedFlags(self, conf):
         flags = super(GccFlags, self).getOptimizedFlags(conf)
         flags['CXXFLAGS'] += ['-fdiagnostics-color',
-                              '-Wredundant-tags',
+                              #'-Wredundant-tags', # Qt5
                               ]
         if platform.machine() == 'armv7l' and self.getCompilerVersion(conf) >= (7, 1, 0):
             flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106
@@ -225,4 +226,4 @@
                               ]
         if self.getCompilerVersion(conf) < (6, 0, 0):
             flags['CXXFLAGS'] += ['-Wno-missing-braces'] # Bug #4721
-        return flags
\ No newline at end of file
+        return flags
