QDataStream & QDataStream::readBytes(char *& s, uint & l)

ストリームからバッファー s へ読み込み、ストリームへの参照を返します。
バッファー s は、new を使ってアロケートされます。破棄には、delete[] オペレーターを付けてください。
l パラメーターには、バッファーの長さをセットしてください。文字列が空の場合、l には 0 がセットされて、s には null ポインターがセットされます。
The serialization format is a quint32 length specifier first, then l bytes of data.

参考 readRawData(), writeBytes()

Reads the buffer s from the stream and returns a reference to the stream. The buffer s is allocated using new. Destroy it with the delete operator. The l parameter is set to the length of the buffer. If the string read is empty, l is set to 0 and s is set to a null pointer. The serialization format is a quint32 length specifier first, then l bytes of data.

See also readRawData() and writeBytes().

エラー: デバッガ ”C:\android-ndk-r11c\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-gdb.exe" が見つかりませんでした。

問題

  • Android NDK パスに、 Android NDK r11c へのパスを設定すると、"Android for armeabi-v7a (GCC 4.9, Qt 5.6.0)" キットに(!)マークが表示される。

  • チップに次のメッセージが表示される。

エラー: デバッガ ”C:\android-ndk-r11c\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-gdb.exe" が見つかりませんでした。

  • [Debuggers] タブの "Android Debugger for Android GCC (arm-4.9)" の [Path] の値が赤色で表示される。

  • チップに次のメッセージが表示される。

"C:\android-ndk-r11c\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-gdb.exe" は存在しません。

環境

  • Android NDK r11c
  • Qt Creator 3.6.0

原因

Android NDK r11 から、GDB が異動されたため。

解決策

Android NDK r10e を使う。

GDB は、 <ndk_dir>/prebuilt//bin/gdb[.exe] にあるが、正しく機能しない。

参考

error: invalid environment block

OS 起動時に次のエラーが表示される。ただし、OS は起動する。

error: invalid environment block

環境

原因

/boot/grub/grubenv が壊れているらしい。

解決策

/boot/grub/grubenv を削除する。(次回起動時に自動作成される。)

$ sudo  rm  /boot/grub/grubenv

参考

Object::connect: No such slot QTcpSocket::onReadyRead() in ../project/source.cpp:6

問題

アプリケーション実行中に次のようなメッセージが表示される。

Object::connect: No such slot QTcpSocket::onReadyRead() in ../project/source.cpp:6

原因

クラス定義に "Q_OBJECT" を書いていなかったため。

解決策

クラス定義に "Q_OBJECT" を書く。

class MySocket : public QTcpSocket
{
    Q_OBJECT
...

PREFERRED_VERSION

レシピの複数のバージョンが利用可能である場合、この変数は優先されるべきレシピを決定します。あなたはいつもあなたが選択したい PN で変数をサフィックスする必要があり、優先順位のためにそれに応じて PV を設定する必要があります。あなたは、潜在的に変更される可能性が長いリビジョン番号が含まれているバージョンを指定する際に有用であることができる任意の数の文字と一致するワイルドカードとして "%" 文字を使用することができます。ここでは2つの例を示します。

PREFERRED_VERSION_python = "2.7.3"
PREFERRED_VERSION_linux-yocto = "3.19%"

If there are multiple versions of recipes available, this variable determines which recipe should be given preference. You must always suffix the variable with the PN you want to select, and you should set the PV accordingly for precedence. You can use the "%" character as a wildcard to match any number of characters, which can be useful when specifying versions that contain long revision numbers that could potentially change. Here are two examples:

PREFERRED_VERSION_python = "2.7.3"
PREFERRED_VERSION_linux-yocto = "3.19%"

DEFAULT_PREFERENCE

レシピ選択の優先順位のための弱いバイアスを指定します。

この変数の最も一般的な使い方は、ソフトウェアの一部の開発バージョンのためのレシピの中に "-1" に設定することです。 このように変数を使うと、PREFERRED_VERSION が無い場合に、デフォルトで構築されレシピの安定したバージョンになります。開発バージョンを構築するために使われます。

注意

DEFAULT_PREFERENCE のバイアスは弱く、同じレシピで異なるバージョンを含む2つのレイヤー間で変数が異なる場合に BBFILE_PRIORITY によって上書きされます。

Specifies a weak bias for recipe selection priority.

The most common usage of this is variable is to set it to "-1" within a recipe for a development version of a piece of software. Using the variable in this way causes the stable version of the recipe to build by default in the absence of PREFERRED_VERSION being used to build the development version.

Note

The bias provided by DEFAULT_PREFERENCE is weak and is overridden by BBFILE_PRIORITY if that variable is different between two layers that contain different versions of the same recipe.