ECMAScript6 Promise
PromisePromise 对象是一个等待处理结果的占位符。它具有三个互斥状态:fulfilled, rejected, _pending_。
12345678910111213141516171819const resolve = (res) => { console.log('resolve: ' + res);};const reject = () => { console.log('reject: ' + res);};const fn = (flag) => { return new Promise((resolve, reject) => { if (flag === true) { resolve(); } if (flag === false) { reject(); } }).then(resolve, reject);};fn(tr ...
QtApplication 国产化适配
安装 QT Creator官方下载地址:https://download.qt.io/archive/qt/
代码兼容添加平台兼容代码:
12#ifdef Q_OS_LINUX#endif
编译源码对修改后的兼容性代码进行编译。
程序打包将编译好的文件复制到打包目录进行打包。
1dekg -b ./path
测试运行测试程序是否正常启动。
功能检测对即时通讯客户端的功能进行检测。
输入法修复为继承 QWidget 类的类添加:
123this->setAttribute(Qt::WA_InputMethodEnabled, true);this->setAttribute(Qt::WA_KeyCompression, true);this->setFocusPolicy(Qt::WheelFocus);
安装 extra-cmake-modules, libxkbcommon-dev。
克隆 fcitx-qt5 到本地:
1git clone https://github.com/fcitx/fcitx-qt5.git
Qt Creator 打开 fcitx- ...
Git 使用指南
常见问题这里列举一些经常会遇到然后去百度的问题。
远程创建新分支,本地获取不到
https://git-scm.com/book/zh/v2/Git-分支-远程分支
12# 从远程获取git fetch