QDialog::reject can be invoked multiple times

When user use ESC to close the dialog and press it very quickly two or more times in a row, QDialog::reject can be invoked also multiple times.

This is very dangerous and unpredictable because in case your reject will contain some one-time-execute routine the application will start crashing.

The only solution I found is to add these routines to QDialog destructor instead of to reject/accept.

Keyboard and mouse recording tools


How to update gcc to 4.8.1 on any ubuntu

Everything is perfectly explained in this post:


List of commands

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update; sudo apt-get install gcc-4.8 g++-4.8
sudo update-alternatives --remove-all gcc 
sudo update-alternatives --remove-all g++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
gcc --version


Mac OS – app can’t be opened because the identity of the developer cannot be confirmed.

Starting with OS X 10.10 existing code signing method doesn’t work. If you have application signed for 10.9 and application works without problems, with 10.10 you will get following error:


How to verify application sign status from command line:

codesign -dvvv /Applications/APP.app

Format=bundle with Mach-O thin (x86_64)
CodeDirectory v=20100 size=239848 flags=0x0(none) hashes=11986+3 location=embedded
Hash type=sha1 size=20
Signature size=4237
Authority=Developer ID Application: Inventic s.r.o. (6BYV46LH6T)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Signed Time=03 Feb 2015 17:38:21
Info.plist entries=10
TeamIdentifier=not set
Sealed Resources version=1 rules=4 files=44
Internal requirements count=1 size=300

As it’s seems from the verification output, application is correctly signed but OSX doesn’t accept it. Another way how to verify application sign status is via spctl command:

spctl --assess --type execute --verbose Skipper.app/

Skipper.app/: rejected
source=obsolete resource envelope

We have some error at least. Now it’s necessary to find out what is wrong. We can try one more test:

codesign -v Skipper.app/
Skipper.app/: resource envelope is obsolete (version 1 signature)

where we dest little bit more details. All these errors we get only on 10.10 mac, not on 10.9 or older.

After another investigation I found following article. The most important part is:

“Important: For your apps to run on updated versions of OSX they must be signed on OS X version 10.9 or later and thus have a version 2 signature.”

Another post about this topic is in felix-schwarz.org blog.

So ,it’s bad. We need to update our build machine to 10.9 or at least create new “sign machine” and make sure that everything will work as expected.

Additional links

Microsoft azure – WordPress hosting tuning

How to configure rewrite rules:

It’s necessary to connect via FTP to azure VM and update ftp://host/site/wwwroot/web.config file.

				<rule name="Rewrite tcS3_media">
					<match url="^tcS3_media/(.*)" />
					<action type="Redirect" url="http://downloads.vodnici.net/{R:1}" appendQueryString="false" redirectType="Permanent" />

How to migrate other blogs to WordPress on Azure

 Mass delete all images from media library

  • install SQL Executioner
  • run DELETE FROM `wp_posts` WHERE `post_type` = “attachment”

Update Samsung Galaxy S3 – I9300 to Android 5.0.3 Lollipop

Step by step for installation

Rom managers

Root telefon

Clockwork mod

Enable debugging

Android SDK



Disable sudo password on Jenkins build machines

edit file sudoers

sudo nano /etc/sudoers


sudo visudo

and modify

%sudo ALL=(ALL) ALL



and add following line to the end of the file:


Be careful!

When editing sudoers, it’s necessary to be very careful. Any error cause that you will not be able to edit this file anymore and also not to use sudo ;-).

Here are links how to fix it (verified 😉 )

Remote links

Autossh forward ports to whole network

Use -g swith after -L section to forward ports to whole network

autossh -M 40008 -f -N [email protected] -L 33061: -g -L 6380: -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -o BatchMode=yes -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa

Other notes

Configuration file : /etc/init/autossh.conf

Start service:

sudo service autossh start


Other links

Enabling SSL on Mongoose http server



pstrReturn = mg_set_option(serverHttps, "listening_port", "ssl://443:ssl.pem");  // Open port 443 with ssl.pem certificate


# openssl version
OpenSSL 1.0.0-beta2 21 Apr 2009

# openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 1000 -nodes

# cat key.pem > ssl.pem; cat cert.pem >> ssl.pem

Testing mongoose server via command line (curl), Switch -k allow to use self-signed certificates.

curl -X OPTIONS --header "Access-Control-Request-Method:GET" --header "Access-Control-Request-Headers: accept, x-coral-api-key" https://server.a18/v1/service/method -k