Qt Test で "QObject::startTimer: QTimer can only be used with threads started with QThread" が表示される

メッセージ

QObject::startTimer: QTimer can only be used with threads started with QThread

原因

  • QApplication なし(QTEST_APPLESS_MAIN マクロ)で実行しているため

対処

"QTEST_APPLESS_MAIN" を "QTEST_MAIN" に置き換える

#include <QCoreApplication>
...
QTEST_MAIN(MyTest)

apt install と apt-get source でパッケージのバージョンが違う

環境

Ubuntu 14.04 LTS (trusty)

原因

/etc/apt/sources.list に、アップデートされたパッケージのソース URL が書かれていなかったため。

deb http://security.ubuntu.com/ubuntu/ trusty-security main universe
deb http://jp.archive.ubuntu.com/ubuntu/ trusty-updates main universe

対処

/etc/apt/sources.list に、ソース URL を追記する。

deb http://security.ubuntu.com/ubuntu/ trusty-security main universe
deb-src http://security.ubuntu.com/ubuntu/ trusty-security main universe
deb http://jp.archive.ubuntu.com/ubuntu/ trusty-updates main universe
deb-src http://jp.archive.ubuntu.com/ubuntu/ trusty-updates main universe

smb.conf に "client min protocol = SMB2" を書いたら smbclient が NT_STATUS_INVALID_PARAMETER_MIX で失敗した

$ smbclient -L 192.168.0.1
Enter user's password: 
protocol negotiation failed: NT_STATUS_INVALID_PARAMETER_MIX

原因

  • "client min protocol" に "client max protocol" より新しいプロトコルを指定したため
    • "client max protocol" のデフォルトは "NT1" (Samba 4.3.11)

対処

"client max protocol" も明示する

client max protocol = SMB3
client min protocol = SMB2

参考

smb.conf に "min protocol = SMB2" を書いたら smbclient が NT_STATUS_CONNECTION_RESET エラーで失敗した

$ smbclient -L 192.168.0.1
Enter user's password: 
protocol negotiation failed: NT_STATUS_CONNECTION_RESET

原因

  • "min protocol" と書いていたため
    • "min protocol" は "server min protocol" と同義のため、クライアントの動作には効かない

対処

"client min protocol" と書く

client min protocol = SMB2