Macro Q_ERROR, Q_VALUE and Q_OK added to handle return codes and error messages.