Skip to content
Snippets Groups Projects
Verified Commit 1ce59fa0 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Making sure that all serialized data is actually serializable

parent eff4df64
No related branches found
No related tags found
No related merge requests found
......@@ -102,9 +102,9 @@ class NetworkSetupNetworkSlide : ServiceBoundSlideFragment() {
}
override fun getData(data: Bundle) {
data.putSerializable(
data.putInt(
"identity",
identityAdapter.getItemId(this.identity.selectedItemPosition)
identityAdapter.getItemId(this.identity.selectedItemPosition).toInt()
)
val networkId = (network.selectedItem as? INetwork.NetworkInfo)?.networkId
if (networkId != null) {
......
......@@ -22,12 +22,15 @@ package de.kuschku.libquassel.protocol.coresetup
import de.kuschku.libquassel.protocol.*
import java.io.Serializable
class CoreSetupBackendConfigElement : Serializable {
val key: String
val displayName: String
private val typeId: Int
private val customType: String
private val rawDefaultValue: Any?
class CoreSetupBackendConfigElement(
val key: String,
val displayName: String,
defaultValue: QVariant_
) : Serializable {
private val typeId = defaultValue.type.id
private val customType = defaultValue.type.serializableName
private val rawDefaultValue = defaultValue.data as? Serializable
val defaultValue: QVariant_
get() {
val type = Type.of(typeId)
......@@ -41,14 +44,6 @@ class CoreSetupBackendConfigElement : Serializable {
}
}
constructor(key: String, displayName: String, defaultValue: QVariant_) {
this.key = key
this.displayName = displayName
this.typeId = defaultValue.type.id
this.customType = defaultValue.type.serializableName
this.rawDefaultValue = defaultValue.data
}
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment