| 1117 | } |
| 1118 | |
| 1119 | void Client::menuGroupAddOnClick() { |
| 1120 | if ((!m_databaseWrapper.hasDatabase()) || (!m_messageCenterWrapper.hasMessageCenter())) { |
| 1121 | QMessageBox::warning(this, "No database loaded", "Before you can use this feature you need to load a database from file (see main screen) or create one using a backup of your existing ID (see Identity -> Load Backup)."); |
| 1122 | } else if (m_protocolClient == nullptr || !m_protocolClient->getIsConnected()) { |
| 1123 | QMessageBox::warning(this, "Not connected to a server", "Before you can use this feature you need to connect to a server."); |
| 1124 | } else { |
| 1125 | QHash<openmittsu::protocol::ContactId, openmittsu::database::ContactData> contactData = m_databaseWrapper.getContactDataAll(false); |
| 1126 | contactData.remove(m_databaseWrapper.getSelfContact()); |
| 1127 | |
| 1128 | openmittsu::wizards::GroupCreationWizard groupCreationWizard(contactData, std::make_unique<openmittsu::dataproviders::SimpleGroupCreationProcessor>(m_messageCenterWrapper), this); |
| 1129 | groupCreationWizard.exec(); |
| 1130 | } |
| 1131 | } |
| 1132 | |
| 1133 | void Client::menuAboutStatisticsOnClick() { |
| 1134 | if ((m_protocolClient == nullptr) || (!m_protocolClient->getIsConnected())) { |
nothing calls this directly
no test coverage detected