Skip to content

Commit

Permalink
Merge pull request #5 from oblivioncth/dev
Browse files Browse the repository at this point in the history
Minor doc hotifx
  • Loading branch information
oblivioncth committed Sep 3, 2022
2 parents b66046d + 0e60675 commit 4115f6e
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 233 deletions.
18 changes: 12 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ option(QI_QMP_DOCS_TARGET "Build QI-QMP documentation" OFF)

# Project
# NOTE: DON'T USE TRAILING ZEROS IN VERSIONS
set(QI_QMP_BASE_VERSION 0.1.2) # Required for CI/CD
set(QI_QMP_BASE_VERSION 0.1.2.1) # Required for CI/CD
project(QI-QMP
VERSION ${QI_QMP_BASE_VERSION}
LANGUAGES CXX
Expand All @@ -34,7 +34,13 @@ set(CMAKE_AUTOMOC ON)
# Add local modules
set(PROJ_SCRIPTS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${PROJ_SCRIPTS_PATH}/module")
include(QI-QMP/Utility)

# Get helper scripts
include(QI-QMP/FetchOBCMake)
fetch_ob_cmake("v0.1")

# Include utility functions
include(OB/Utility)

# General Variables
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
Expand Down Expand Up @@ -87,7 +93,7 @@ set(PACKAGE_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/out/dist")
#------------Set Global Build Rules----------------

# Versioning
include(QI-QMP/VerboseVersioning)
include(OB/VerboseVersioning)
setup_verbose_versioning(PROJECT_VERSION_VERBOSE)

#================= Build =========================
Expand All @@ -102,11 +108,11 @@ set(QT_FIND_COMPONENTS
add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x060000)

# Find Qt package
include(QI-QMP/BetterFindQt6)
include(OB/BetterFindQt6)
find_qt6_package(REQUIRED COMPONENTS ${QT_FIND_COMPONENTS})

# Fetch Qx (build and import from source)
include(QI-QMP/FetchQx)
include(OB/FetchQx)
fetch_qx("v0.3.1")

# Set lib sources
Expand Down Expand Up @@ -217,7 +223,7 @@ if(QI_QMP_DOCS_TARGET)
)

# Determine Qt related doc paths
include(QI-QMP/QtDocsHelper)
include(OB/QtDocsHelper)
configure_qt_doc_link(${Qt6_PREFIX_PATH})

# Set Doxygen parameters
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# QI-QMP
QI-QMP is a minuscule C++ library, which utilizes Qt, that provides an interface to QEMU instances via the QEMU Machine Protocol. In other words, this library implements the client side of QMP for C++.
QI-QMP is a minuscule C++/Qt library that provides an interface to QEMU instances via the QEMU Machine Protocol. In other words, this library implements the client side of QMP for C++.

It presents as a QObject derived class, `Qmpi`, that is operated via member functions and connecting to its signals.

Expand Down
39 changes: 0 additions & 39 deletions cmake/module/QI-QMP/BetterFindQt6.cmake

This file was deleted.

13 changes: 13 additions & 0 deletions cmake/module/QI-QMP/FetchOBCMake.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Sets up OBCMake to be imported via git

# git_ref - Tag, branch name, or commit hash to retrieve. According to CMake docs,
# a commit hash is preferred for speed and reliability

macro(fetch_ob_cmake git_ref)
include(FetchContent)
FetchContent_Declare(OBCMake
GIT_REPOSITORY "https://github.com/oblivioncth/OBCMake"
GIT_TAG ${git_ref}
)
FetchContent_MakeAvailable(OBCMake)
endmacro()
13 changes: 0 additions & 13 deletions cmake/module/QI-QMP/FetchQx.cmake

This file was deleted.

46 changes: 0 additions & 46 deletions cmake/module/QI-QMP/QtDocsHelper.cmake

This file was deleted.

24 changes: 0 additions & 24 deletions cmake/module/QI-QMP/Utility.cmake

This file was deleted.

96 changes: 0 additions & 96 deletions cmake/module/QI-QMP/VerboseVersioning.cmake

This file was deleted.

16 changes: 8 additions & 8 deletions src/qmpi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,18 +531,18 @@ void Qmpi::setTransactionTimeout(int timeout) { mTransactionTimer.setInterval(ti
int Qmpi::transactionTimeout() const { return mTransactionTimer.interval(); }

/*!
* Attempts to make a connection to the QEMU instance specified by IP address and port
* Attempts to make a connection to the QEMU instance specified by address and port
* during the interface's construction.
*
* The interface's state immediately changes to @ref Connecting, followed by
* @ref AwaitingWelcome if the underlying socket successfully establishes a connection.
* Once the interface has received the server's welcome message connected() is emitted
* Once the interface has received the server's welcome message, connected() is emitted
* and Qmpi enters the @ref Negotiating state. At this point capabilities negotiation is
* handled automatically since only the base protocol capabilities are currently supported,
* upon which readyForCommands() is emitted and the interface enters the @ref Idle state.
*
* At any point, the interface can emit connectionErrorOccurred() or communicationErrorOccurred()
* signal an error occurred.
* to signal an error occurred.
*
* @sa state(), and disconnectFromHost().
*/
Expand Down Expand Up @@ -722,7 +722,7 @@ void Qmpi::handleTransactionTimeout() { raiseCommunicationError(CommunicationErr
* @fn void Qmpi::readyForCommands()
*
* This signal is emitted once capabilities negotiation has been completed and the server is ready to
* received commands.
* receive commands.
*
* @sa connected().
*/
Expand Down Expand Up @@ -755,12 +755,12 @@ void Qmpi::handleTransactionTimeout() { raiseCommunicationError(CommunicationErr
/*!
* @fn void Qmpi::responseReceived(QJsonValue value, std::any context)
*
* This signal is emitted when the a successful (i.e. `return`) response is received from the server
* This signal is emitted when a success (i.e. `return`) response is received from the server
* after executing a command.
*
* @a value contains the return value of the command, which may be an empty QJsonObject if the command
* @a value contains the return value of the command, which will be an empty QJsonObject if the command
* does not return data, while @a context contains the context object provided when the command was
* executed, if it was set.
* executed, if set.
*
* @sa errorResponseReceived().
*/
Expand Down Expand Up @@ -807,7 +807,7 @@ void Qmpi::handleTransactionTimeout() { raiseCommunicationError(CommunicationErr
*
* @a errorClass contains the type of error and @a description contains a human readable
* summary of the error, while @a context contains the context object provided when the
* command was executed, if it was set.
* command was executed, if set.
*
* @sa responseReceived().
*/
Expand Down

0 comments on commit 4115f6e

Please sign in to comment.